#include <iostream>
using namespace std;
int main() {
int number;
cin >> number;
int *arr = new int[number];
for (int i = 0; i < number; i++)
{
cin >> arr[i];
}
int last = arr[number - 1];
for (int i = number - 1; i >= 0; i--)
{
arr[i] = arr[i - 1];
}
arr[0] = last;
for (int i = 0; i < number; i++)
{
cout << arr[i] << ' ';
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgbnVtYmVyOwoJY2luID4+IG51bWJlcjsKCWludCAqYXJyID0gbmV3IGludFtudW1iZXJdOwoJZm9yIChpbnQgaSA9IDA7IGkgPCBudW1iZXI7IGkrKykKCXsKCQljaW4gPj4gYXJyW2ldOwoJfQoJaW50IGxhc3QgPSBhcnJbbnVtYmVyIC0gMV07Cglmb3IgKGludCBpID0gbnVtYmVyIC0gMTsgaSA+PSAwOyBpLS0pCgl7CgkJYXJyW2ldID0gYXJyW2kgLSAxXTsKCX0KCWFyclswXSA9IGxhc3Q7Cglmb3IgKGludCBpID0gMDsgaSA8IG51bWJlcjsgaSsrKQoJewoJCWNvdXQgPDwgYXJyW2ldIDw8ICcgJzsKCX0KCXJldHVybiAwOwp9