S=input() for s in S: print(s.swapcase(),end="")