S = input() ans = "" for s in S: ans += s.swapcase() print(ans)