import java.util.Scanner; public class Main { static Scanner in = new Scanner(System.in); public static void main(String[] args) { int n = in.nextInt(); int[] a = new int[n]; for(int i = 0; i < n; i++){ a[i] = in.nextInt(); } for(int i = 0; i < 2 * n - 3; i++){ for(int j = (i + 1) / 2; j <= i; j++){ int q = j; int p = i - q; if(q <= n - 1 && a[p] > a[q]){ int t = a[p]; a[p] = a[q]; a[q] = t; } } } for(int i = 0; i < a.length; i++){ if(i != 0){ System.out.print(" "); } System.out.print(a[i]); } System.out.println(); } }