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