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