#include<stdio.h>
#include<stdlib.h>
int main()
{
int ch;
while((ch=getchar()) != EOF)
if(ch>=65 && ch<=95)
{ ch+=32;
putchar(ch);
printf("\n");
}
else
{ ch-=32;
putchar(ch);
printf("\n");
}
}