string = input() for i in string: print(i.lower(),end='') if i.isupper() else print(i.upper(),end='')