s=input() ans="" for i in range(len(s)): if ord(s[i])<95: ans+=s[i].swapcase() else: ans+=s[i] print(ans)