s=input() if s.isupper(): print(chr(ord(s)+32),end='') elif s.islower(): print(chr(ord(s)-32),end='')