#include <iostream>
#include <cstdlib>
using namespace std;
typedef struct node
{
int data;
pNODE next;
}NODE, * pNODE;
int main()
{
pNODE head, p, q, t;
int a, i, n;
cin >> n;
head = NULL;
for (i = 1; i <= n; i++)
{
cin >> a;
p = (pNODE)malloc(sizeof(NODE));
p->data = a;
p->next = NULL;
if (head == NULL)
head = p;
else
q->next = p;
q = p;
}
t = head;
while (t != NULL)
{
cout << t->data;
t = t->next;
}
free(p);
system("pause");
return 0;
}