s = input() result = s.swapcase() print(result)