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