S=input()
T=""

for x in S:
    if ord(x)<=ord("Z"):
        T+=chr(ord(x)+32)
    else:
        T+=chr(ord(x)-32)

print(T)