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