#include
#include
struct node
{
int data;
struct node next;
};
struct node creat1(int n)
{
struct node head,*p;
head=(struct node *)malloc(sizeof(struct node));
head->next=NULL;
int i;
for(i=1;i<=n;i++)
{
p=(struct node)malloc(sizeof(struct node));
scanf("%d",&p->data);
p->next=head->next;
head->next=p;
}
return(head);
};
int main()
{
struct node *head,*p;
int n ;
scanf("%d",&n);
head=creat1(n);
p=head->next;
while(p!=NULL)
{
printf("%d ",p->data);
p=p->next;
}
return 0;
}