S = str(input()) reverse_S = "" for char in S: if char.islower(): reverse_S += char.upper() else: reverse_S += char.lower() print(reverse_S)