S=input() for s in S: print(chr(ord(s)+32*(-1)**(ord(s)>=90)),end="")