Sequence of Letter Returned: 1196784

Question 2 : AB*C**F*GH**

Stack

Push(A)    
APush(B)   
APop(B)   
APush(c)   
APop(C)   
Pop(A)    
Push (F)    
Pop(F)    
Push(G)    
GPush(H)   
GPop(H)   
Pop(G)    

Sequence of letter returned

BCAFHG

Question 2

BEDCGFA

Push(A)   
APush(B)  
Pop(B)   
APush(c)  
ACPush(D) 
ACDPush(E)
ACDPop(E)
ACPop(D) 
APop(c)  
APush(F)  
AFPush(G) 
AFPop(G) 
APop(F)  
Pop(A)   

Let letters represent the push and asterisk to stand for POP operation

AB*CDE***FG***