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