print(''.join([c.upper() if 'a' <= c <= 'z' else c.lower() for c in input()]))