#include <iostream>
#include <stack>
using namespace std;
int main(int argc, char **argv){
stack<int> stack;
for(int i = 1; i < 5; i++)
stack.push(i);
for(int i = 0; i < 4; i++){
cout << stack.top() << "\n";
stack.pop();
}
return EXIT_SUCCESS;
}