#include <iostream>
#include <cstdio>
#define Null 0
using namespace std;
struct List{
int name;
struct List *next;
}record;
struct List *head, *now, *last;
int main(){
head = Null;
now = Null;
last = Null;
int n ;
cin >> n;
for(int i = 0; i < n; i ++){
now = (struct List *)malloc(sizeof(record));
scanf("%d",&now ->name);
now ->next = Null;
if(!head) head = now;
else last ->next = now;
last = now;
}
now = head;
struct List *p,*q,*t;
p = head;
q = p ->next;
for(int i = 0 ;i < n-1; i ++){
t = q ->next;
q ->next= p;
p = q;
q = t;
}
head ->next = t;
now = p;
while(now){
cout << now ->name << endl;
now = now ->next;
}
return 0;
}