import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
int [] arr = new int[n];
for (int i = 0; i<arr.length; i++) {
arr[i] = scn.nextInt();
}
insertion(n, arr);
}
public static void insertion(int n, int a[]) {
for (int i = 0; i < a.length; i++) {
int temp = a[i];
int j = i - 1;
while (j >= 0 && a[j] > temp) {
a[j + 1] = a[j];
j--;
}
a[j + 1] = temp;
}
for (int i = 0; i < a.length; i++) {
System.out.println(a[i]);
}
}
}