#coding:utf-8

moji = list(input().rstrip())
moji2 =[]
for i in moji:
    if i.isalpha() == False:
        moji2.append(i)

    elif i.islower() == True:
        moji2.append(i.upper())
    else:
        moji2.append(i.lower())

print("".join(moji2))
d3e6a4b0d64fdd40c96ba85e391b4b8ee6a135d0
<mask token>

<mask token>
for i in moji:
    if i.isalpha() == False:
        moji2.append(i)
    elif i.islower() == True:
        moji2.append(i.upper())
    else:
        moji2.append(i.lower())
print(''.join(moji2))

moji = list(input().rstrip())
moji2 = []
for i in moji:
    if i.isalpha() == False:
        moji2.append(i)
    elif i.islower() == True:
        moji2.append(i.upper())
    else:
        moji2.append(i.lower())
print(''.join(moji2))

#coding:utf-8

moji = list(input().rstrip())
moji2 =[]
for i in moji:
    if i.isalpha() == False:
        moji2.append(i)

    elif i.islower() == True:
        moji2.append(i.upper())
    else:
        moji2.append(i.lower())

print("".join(moji2))