#include <ctype.h>
int main()
{
char ch;
while(scanf("%c",&ch) != EOF)
{
getchar();
if(isupper(ch)) //大写
{
ch += 32;
printf("%c\n", ch);
}
else if(islower(ch)) //小写
{
ch -= 32;
printf("%c\n", ch);
}
}
return 0;
}