#include<stdio.h>
#include<stdlib.h>
typedef struct node1{
int data1[10];
int top1;
}z1;
typedef struct node2{
int data2[10];
int top2;
}z2;
z1 *creat1(){
z1 *p=(z1*)malloc(sizeof(z1));
p->top1=-1;
return p;
}
z2 *creat2(){
z2 *q=(z2*)malloc(sizeof(z2));
q->top2=-1;
return q;
}
void push1(z1 *s,int x){
s->top1++;
s->data1[s->top1]=x;
}
void push2(z2 *s,int x){
s->top2++;
s->data2[s->top2]=x;
}
int pop1(z1 *s){
int x=s->data1[s->top1];
s->top1--;
return x;
}
int pop2(z2 *s){
int x=s->data2[s->top2];
s->top2--;
return x;
}
main(){
z1 *p;
z2 *q;
p=creat1();
q=creat2();
int n,x,t;
scanf("%d",&n);
for(int i=0;i<n;i++){
scanf("%d",&x);
push1(p,x);
}
for(int i=0;i<n;i++){
t=pop1(p);
push2(q,t);
}
for(int i=0;i<n;i++){
t=pop2(q);
printf(" %d ",t);
}
}