s = input() t = [] for i in s: x = ord(i) if x >= 97: t.append(chr(x-32)) else: t.append(chr(x+32)) print(''.join(t))