S = input() result = '' for i in S: if i.islower(): result += i.upper() else: result += i.lower() print(result)