S = input() ans = '' for i in S: x = ord(i) if x >= 97: ans += chr(x-32) else: ans += chr(x+32) print(ans)