#include <iostream>
using namespace std;
typedef struct LNode
{
int data;
struct LNode *next;
}LNode, *Linklist;
void CreatList(Linklist &L, int n)
{
int item;
Linklist p;
L = new LNode;
L->next = NULL;
for (int i = 0; i < n; i++)
{
p = new LNode;
cin >> p->data;
p->next = L->next;
L->next = p;
}
}
void PrintList(Linklist L)
{
Linklist p;
p = L->next;
while (p)
{
cout << p->data << " ";
p = p->next;
}
}
int main()
{
int n;
Linklist L;
cin >> n;
CreatList(L, n);
PrintList(L);
system("pause");
return 0;
}