a = input() print(a.swapcase(), end='\n')