#include <bits/stdc++.h>
using namespace std;
const int N = 11;
int main() {
int temp = 0;
int n = 0;
int a[N];
cin >> n;
for(int i=1; i<=n; i++) {
cin >> a[i];
}
temp = a[1];
for(int i=2; i<=n; i++) {
a[i-1] = a[i];
}
a[n] = temp;
for(int i=1; i<=n; i++) {
cout << a[i] << ' ';
}
return 0;
}