s = input() result = "" for si in s: if si.islower(): result+=si.upper() else: result+=si.lower() print(result)