S=input() for character_str in S: if character_str.isupper(): print(character_str.lower(),end="") else: print(character_str.upper(),end="")