def get_input(text: str):
    """Handle user input.

    The function exits cleanly on ``KeyboardInterrupt`` and ``EOFError``
    (ctrl-c and ctrl-d).

    Args:
        Text (str): Prompt to print. A greater than symbol (">") is appended to
            the end and escape codes are used to make the prompt bold.

    Returns:
        Str: User's input.

    """
    try:
        user_input = input("\033[1m" + text + " > \033[0m")
    except (KeyboardInterrupt, EOFError):
        print("\nBye.")
        exit(0)
    return user_input