class Problem0163: def solve(this): s = input() print(s.swapcase()) if __name__ == "__main__": problem = Problem0163() problem.solve()