S = input() swap = str.swapcase(S) print(swap)