Stack is special container for which you need to pop the top elements to access the elements below it, unless any special stack constainer gives that access.
What is the stack container you are using, if you are using STL stack, the only way to read the elemetns below is to pop the top.
Hint: You can have a second stack and pop from the first stack, print it, and push it in to seconds stack, then repeat this on all the elements in first stack. When done do the reverse, pop from second stack and push into first stack. this way you will have the fist stack intact