# -*- coding: utf-8 -*-

def toggle_case(x):
    return chr(ord(x) ^ 32)


S = raw_input()

print "".join(map(toggle_case, S))