lowers = 'abcedfghijklmnopqrstuvwxyz' result = '' s = input() for l in s: if l in lowers: result += l.upper() else: result += l.lower() print(result)