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