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