import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] arr = new int[n]; for (int i = 0; i < n; i++) { arr[i] = sc.nextInt(); } for (int i = 1; i < 2 * n - 3; i++) { for (int j = 0; j < n - 1 && j * 2 < i; j++) { int p = j; int q = i - j; if (q > n - 1) { continue; } if (arr[p] > arr[q]) { int tmp = arr[p]; arr[p] = arr[q]; arr[q] = tmp; } } } StringBuilder sb = new StringBuilder(); for (int i = 0; i < n; i++) { if (i > 0) { sb.append(" "); } sb.append(arr[i]); } System.out.println(sb); } }