import sys input = sys.stdin.buffer.readline print(input().swapcase().decode('utf-8'))