If you need to do this, then stack or queue is not the correct choice of container.
If you still insist on doing this, the best way is to make a copy and pop elements off of it and print them. I'm not going to suggest another way because there's no point.