print "".join([c.lower() if ord(c) < 91 else c.upper() for c in raw_input()])