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