s = input() t = "" for i in range(len(s)): if ord(s[i]) <= 90: t += chr(ord(s[i])+32) else: t += chr(ord(s[i])-32) print(t)