#include<iostream>
#include<queue>
using namespace std;
int main()
{
queue<int> q;
int n,x;
cin>>n;
while(n--)
{
cin>>x;
q.push(x);
}
while(q.empty()==false)
{
cout<<q.front()<<" ";
q.pop();
if(!q.empty())
{
q.push(q.front());
q.pop();
}
}
return 0;
}