a=input() t="" for i in a: if i.islower(): t+=i.upper() if i.isupper(): t+=i.lower() print(t)