# -*- coding: utf-8 -*- __author__ = 'yuuki' #No.163 cAPSlOCK c = raw_input() print c.swapcase()