#include <stdio.h>
 #include <stdlib.h>
 struct s{
     int a;
     s *next;
 };
 int main()
 {
     int n,i;
     s *head,*p,*r;
     scanf("%d",&n);
     head=(s*)malloc(sizeof(s));
     head->next=NULL;
     r=head;
     for(i=0;i<n;i++)
     {
         p=(s*)malloc(sizeof(s));
         scanf("%d",&p->a);
         p->next=r->next;
         r->next=p;
         r=p;
     }
     head=head->next;
     while(head!=NULL)
     {
         printf("%d ",head->a);
         head=head->next;
     }
 }










