s = input() current_pw = '' for char in s: if char.isupper(): current_pw += char.lower() else: current_pw += char.upper() print(current_pw)