#include<iostream> #include<cstdio> #include<stack> using namespace std; stack<long long> number; int main(){ int n; while(scanf("%d",&n)!=EOF){ long long num; for(int i=0;i<n;++i){ scanf("%lld",&num); number.push(num); } while(!number.empty()){ cout<<number.top()<<" "; number.pop(); } cout<<endl; } return 0; }