#include <stdio.h>
#include <stdlib.h>
struct node
{
int data;
struct node *next;
}*p, *q, *tail;
int main()
{
int n;
scanf("%d", &n);
tail = (struct node*)malloc(sizeof(struct node));
tail->next = NULL;
q = tail;
while(n--)
{
p = (struct node*)malloc(sizeof(struct node));
scanf("%d", &p->data);
p->next = q;
q = p;
}
while(q->next)
{
printf("%d ", q->data);
q = q->next;
}
printf("\n");
return 0;
}