Data Structures, Algorithms, & Applications in C++
Chapter 8, Exercise 1

The stack configurations are (stack bottom not labeled, it is at the lowest element):
                    B <- top                       T <- top
    A <- top        A               A <- top       A

  (a)  push A      (b)  push B       (c) pop      (d) push T


                    U <- top
    T <- top        T               T <- top
    T               T               T               T <- top
    A               A               A               A

  (e) push T       (f) push U      (g) pop         (h) pop



                    D <- top
    A <- top        A
    T               T
    A               A

   (i) push A      (j) push D