using System;
public class Program
{
public static void Main()
int[] arr = { 1, 2, 3, 4, 5 };
int[] newArr = new int[arr.Length];
for (int i = 0; i < arr.Length; i++)
newArr[(i + 1) % newArr.Length] = arr[i];
}
Console.WriteLine(string.Join(",",newArr));