import java.util.Scanner; public class Yukisort { public static void main(String[] args) { Scanner s = new Scanner(System.in); int n = s.nextInt(),med; int[] a = new int[n]; for(int i = 0;i < n;i++){ a[i] = s.nextInt(); } s.close(); for(int i = 1;i < 2*n-3;i++){ for(int j = 0;j < (i+1)/2;j++){ if(i-j >= 0 &&i -j 0){ a[j] = a[i-j]; a[i-j] = med; } } } } for(int b:a){ System.out.print(b + " "); } System.out.println(); } }