The following sequence of operations is performed on a stack: push(1), push(2), pop, push(1), push(2), pop, pop, pop, push(2), pop. The values will be output in this order:

2,2,1,1,2
  • 1,2,1,2,2
  • 1,2,2,1,2
  • 2,2,1,2,2
  • 2,1,2,2,1
  • 2,1,2,2,2

Trace the series of operations onto a stack.