S = input() small = S.lower() big = S.upper() ans="" for i in range(len(S)): if S[i] == small[i]: ans+=big[i] else: ans+=small[i] print(ans)