def patch(program: list[int], noun: int, verb: int) -> list[int]:
    """Restore the gravity assist program

    :param program: Intcode program
    :param noun: updated noun value
    :param verb: updated verb value
    :return: patched Intcode program
    """
    program[1] = noun
    program[2] = verb
    return program