import sys S = input() for i in S: if (i.islower()): sys.stdout.write(i.upper()) else: sys.stdout.write(i.lower()) print()