print(''.join([(lambda c: c.upper())(c) if c.islower() else c.lower() for c in input()])) #print(input().swapcase())