sen=list(input()) def exchange_num(letter): if letter>=97: ans=letter-32 else: ans=letter+32 return ans final=[] for i in range(0,len(sen)): final.append(chr(exchange_num(ord(sen[i])))) print("".join(final))