S = input() ans = '' for i in S: x = ord(i) if 64 < x < 91: y = x - 65 ans += chr(97 + y) else: y = x - 97 ans += chr(65 + y) print(ans)