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