input_string = input() result = '' for c in input_string: if c.isupper(): result += c.lower() else: result += c.upper() print(result)