Are you familiar with stacks? A stack is a data structure that is accessed only by it's last element. The simplest stack is made with an array and a "top" index. When you start, you can set the top index to zero. To add data to the stack, you "push" it on. To push, you simply do this:
To get data from a stack, you pop it.
So what you do is push ten values, then pop them back. Try it.