S = list(input()) for i in range(len(S)): if S[i].upper() == S[i]: S[i] = S[i].lower() else: S[i] = S[i].upper() print(''.join(S))