using System; using System.Linq; namespace _490 { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int[] x = Console.ReadLine().Split().Select(int.Parse).ToArray(); for (int i = 1; i < 2 * n - 3; i++) { for (int p = 0; p <= n - 1; p++) { for (int q = p + 1; q <= n - 1; q++) { if (p + q == i) { if (x[p] > x[q]) { int a = x[p]; x[p] = x[q]; x[q] = a; } } } } } Console.WriteLine(string.Join(" ",x)); } } }