X = '' for i in input(): X += [chr(ord(i) - 32), chr(ord(i) + 32)][ord(i) < 91] print(X)