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