S=input() for s in S: if ord(s)<=90: print(chr(ord(s)+32),end="") if ord(s)>=97: print(chr(ord(s)-32),end="")