s=input() for i in s: if s.islower(): s.upper() if s.isupper(): s.lower() print(s)