print(''.join(chr(ord(c) + (-32 if ord(c) > 96 else 32)) for c in input()))