#include<iostream>
#include<cstdio>
#include<functional>
#include<algorithm>
#include<queue>
using namespace std;
queue <int > a;
int main()
{
int j = 0;
scanf_s("%d", &j);
for (int i = 0;i < j;i++)
{
int m = 0;
scanf_s("%d", &m);
a.push(m);
}
while (!a.empty())
{
cout<<a.front()<<" ";
a.pop();
int x = a.front();
a.push(x);
a.pop();
}
return 0;
}
代码如上