#include<stdio.h>
#include<stdlib.h>
struct node
{
int data;
struct node *next;
};
struct node *creat(int n)
{
struct node *head,*p,*tail;
int i;
head=(struct node *)malloc(sizeof(struct node));
head->next=NULL;
tail=head;
for(i=1;i<=n;i++)
{
p=(struct node *)malloc(sizeof(struct node));
scanf("%d",&p->data);
p->next=NULL;
tail->next=p;
tail=p;
}
return (head) ;
};
int main()
{
int n;
struct node *head,*t;
scanf("%d",&n);
head=creat(n);
t=head;
while(t->next!=NULL)
{
if(t->next->next==NULL)
printf("%d",t->next->data);
else printf("%d ",t->next->data);
t=t->next;
}
return 0;
}