from typing import Callable


def override_input(inputs: list[str]) -> Callable[[str], str]:
    """
    Returns a new input() function that accepts a string and repeatedly pops strings
    from the front the provided list and returns them as calls to input().
    """

    def _input(prompt: str) -> str:
        """
        The new input() function. Prints a prompt and then modifies the provided list.
        """
        print(prompt)
        if not inputs:
            raise RuntimeError("Not enough inputs provided.")
        return inputs.pop(0)

    return _input