while True: try: c = input() print(str.upper(c) if c >= 'a' else str.lower(c)) except EOFError: break