import sys input = sys.stdin.buffer.readline print(input().swapcase().rstrip())