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