#pragma GCC optmize(2,3,"Ofast","inline")
#include<bits/stdc++.h>
#define int long long
#define endl '\n'
using namespace std;
int n,x;
struct node{
int key;
node * next;
};
node *p,*head = NULL,*q,*t1,*t2;
void create_list(){
cin >> n;
for(int i = 1;i <= n;i++){
cin >> x;
q = new node;
q -> key = x;
q -> next = NULL;
p -> next = q;
}
}
void print_list(){
p = head;
while(p != NULL){
cout << p -> key << " ";
p = p -> next;
}
}
signed main(){
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
create_list();
print_list();
}