using System;
public class Test
{
public static void Main()
{
int[] ar = new int[5];
ar[0] = 6;
ar[1] = 7;
ar[2] = 8;
ar[3] = 9;
ar[4] = 0;
int oldLast = ar[ar.Length - 1];
for (int i = ar.Length - 1; i >= 0; i--)
ar[i] = i == 0 ? oldLast : ar[i - 1];
foreach(int i in ar)
Console.WriteLine(i);
}
}
dXNpbmcgU3lzdGVtOwoKcHVibGljIGNsYXNzIFRlc3QKewoJcHVibGljIHN0YXRpYyB2b2lkIE1haW4oKQoJewogICAgICAgIGludFtdIGFyID0gbmV3IGludFs1XTsKICAgICAgICAgICAgYXJbMF0gPSA2OwogICAgICAgICAgICBhclsxXSA9IDc7CiAgICAgICAgICAgIGFyWzJdID0gODsKICAgICAgICAgICAgYXJbM10gPSA5OwogICAgICAgICAgICBhcls0XSA9IDA7CiAgICAJICAgIGludCBvbGRMYXN0ID0gYXJbYXIuTGVuZ3RoIC0gMV07CiAgICAgICAgZm9yIChpbnQgaSA9IGFyLkxlbmd0aCAtIDE7IGkgPj0gMDsgaS0tKQogICAgICAgICAgICBhcltpXSA9IGkgPT0gMCA/IG9sZExhc3QgOiBhcltpIC0gMV07CiAgICAgICAgZm9yZWFjaChpbnQgaSBpbiBhcikKICAgICAgICAgICAgQ29uc29sZS5Xcml0ZUxpbmUoaSk7Cgl9Cn0=