Question 10
The machine below adds items to the cup underneath as follows:
- Pressing button 1, 2 or 3 drops the leftmost item from the corresponding tray into the cup.
- Pressing button 4 removes the item most recently added to the cup.
For example, pressing buttons 1, 2, 4 and 3 in that order produces the cup shown in Figure 2.

Starting from Figure 1, the beaver presses 3, 1, 1, 4, 4, 2, 3 and 4 in that order. Which item is second from the top of the cup?
- Pressing button 1, 2 or 3 drops the leftmost item from the corresponding tray into the cup.
- Pressing button 4 removes the item most recently added to the cup.
For example, pressing buttons 1, 2, 4 and 3 in that order produces the cup shown in Figure 2.

Starting from Figure 1, the beaver presses 3, 1, 1, 4, 4, 2, 3 and 4 in that order. Which item is second from the top of the cup?