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