S = input() s = S.swapcase() print(s)