#coding: utf-8 ##yuki_163 s=input() print(s.swapcase())