import java.io.BufferedReader;
import java.io.InputStreamReader;
class Main
{
{
String[] params1
= bufferedReader.
readLine().
split(" "); int number;
number
= Integer.
parseInt(params1
[0]); int arr[] = new int[number];
String[] params2
= bufferedReader.
readLine().
split(" "); for (int i = 0; i < number; i++)
{
arr
[i
] = Integer.
parseInt(params2
[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++)
{
}
}
}
aW1wb3J0IGphdmEuaW8uQnVmZmVyZWRSZWFkZXI7CmltcG9ydCBqYXZhLmlvLklucHV0U3RyZWFtUmVhZGVyOwogCmNsYXNzIE1haW4KewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBqYXZhLmxhbmcuRXhjZXB0aW9uCgl7CgkJQnVmZmVyZWRSZWFkZXIgYnVmZmVyZWRSZWFkZXIgPSBuZXcgQnVmZmVyZWRSZWFkZXIobmV3IElucHV0U3RyZWFtUmVhZGVyKFN5c3RlbS5pbikpOwogICAgICAgIFN0cmluZ1tdIHBhcmFtczEgPSBidWZmZXJlZFJlYWRlci5yZWFkTGluZSgpLnNwbGl0KCIgIik7CiAgICAgICAgaW50IG51bWJlcjsKICAgICAgICBudW1iZXIgPSBJbnRlZ2VyLnBhcnNlSW50KHBhcmFtczFbMF0pOwogICAgICAgIGludCBhcnJbXSA9IG5ldyBpbnRbbnVtYmVyXTsKICAgICAgICBTdHJpbmdbXSBwYXJhbXMyID0gYnVmZmVyZWRSZWFkZXIucmVhZExpbmUoKS5zcGxpdCgiICIpOwogICAgICAgIGZvciAoaW50IGkgPSAwOyBpIDwgbnVtYmVyOyBpKyspCiAgICAgICAgewogICAgICAgICAgICBhcnJbaV0gPSBJbnRlZ2VyLnBhcnNlSW50KHBhcmFtczJbaV0pOwogICAgICAgIH0KICAgICAgICBpbnQgbGFzdCA9IGFycltudW1iZXIgLSAxXTsKICAgICAgICBmb3IgKGludCBpID0gbnVtYmVyIC0gMTsgaSA+IDA7IGktLSkKICAgICAgICB7CiAgICAgICAgICAgIGFycltpXSA9IGFycltpIC0gMV07CiAgICAgICAgfQogICAgICAgIGFyclswXSA9IGxhc3Q7CiAgICAgICAgZm9yIChpbnQgaSA9IDA7IGkgPCBudW1iZXI7IGkrKykKICAgICAgICB7CiAgICAgICAgICAgIFN5c3RlbS5vdXQucHJpbnQoYXJyW2ldKTsKICAgICAgICAgICAgU3lzdGVtLm91dC5wcmludCgnICcpOwogICAgICAgIH0KCX0KfQ==