S = input() for i in range(len(S)): if S[i].isupper(): print(S[i].lower(), end = "") else: print(S[i].upper(), end = "") print("")