#   Pythonist 2  to  pYTHONIST 2
#   HackerRank.com presents "Pythonist 2".


str = input( "input a string: ")

for i in str :
    print(i.swapcase(), end = '')
    if i == str.punctuation : 
        print(i, end = '')
    