How to golf string output in Chef
Chef has no string types, so the ingredients are positive integers. 0 is used to separate the starting list from used ingredients and to end the used ingredients list.

A, B: stack
    T, J, IN: int
    T = 1
    A.push(0) // used as the marker for the bottom of the stack
    IN = input() // input the first list
    while(IN):
        A.push(IN)
        IN = input()
    IN = input() // for each used ingredient
    while(IN):
        B.push(0)
        while(T): // move all ingredients up to and including the one we are moving right now to the second stack
            T = A.peek() - IN
            B.push(A.pop())
        A.push(B.pop())
        if(A.peekUnderTop() != 0):
            A.swapTopTwoItems()
        T = B.pop() // move the ingredients from the second stack back to the first
        while(T):
            A.push(T)
            T = B.pop()
        T = IN // to make it non-zero for next iteration
        IN = input(0
    print(A.inverted())