#include <iostream> #include <bits/stdc++.h> using namespace std; int a[200] = {}; int top = 0; bool empty(){ if(top<=0) return true; return false; } int main(){ string s; int n; while(true){ cin>>s; if(s=="push"){ cin>>n; a[top] = n; top++; } if(s=="pop"){ if(!empty()) top--; } if(s=="show"){ if(!empty()){ for(int i=0;i<top;i++) cout<<a[i]<<" "; } else{ cout<<"empty"; } cout<<endl; } } return 0; }