Stack of Book

Problem Description
You need to write a program to emulate a stack of book.

There are two operations of this stack:

push: add an book onto the top of the stack
pop: removes an book from the top of the stack, and then print the name of that book
end: terminate the program
Input
The input contain just one test case.

Each line contains a operation and the length of line is less than 1024 characters.

The amount of operations is less than 100.

You can assume that no pop operation when the stack is empty.

Sample input
push Moby-Dick
push The Little Prince
push The C Programming Language
pop
pop
push Spice and Wolf
pop
end
Sample output
The C Programming Language
The Little Prince
Spice and Wolf