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