a=input() print("".join([x.upper() if x.islower() else x.lower() for x in a]))