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