include<stdio.h>

int main()
{
char ch=0;
while(~scanf("%c",&ch))
{
getchar();
//if(ch<='z'&&ch>='a'||ch<='Z'&&ch>='A')
//{
if(ch<='z'&&ch>='a')//(格式错误的原因是未吸收)
{
printf("%c\n",ch-32);
}
else if(ch<='Z'&&ch>='A')
{
printf("%c\n",ch+32);
}//printf("\n");
//}
//else
//continue;
}
return 0;
}