S = input() ls = list(S) a = [c.swapcase() for c in ls] a = ''.join(a) print(a)