s=input();a='' for i in s: if ord(i) >= 97: i=chr(ord(i) - 32) else: i=chr(ord(i) + 32) a+=i print(a)