/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void segregateInPlace(int[] arr) {
        int n = arr.length;

        for (int i = 1; i < n; i++) {
            if (arr[i] >= 0) {
                int key = arr[i];
                int j = i - 1;

                // Shift negative elements to the right
                // until we find correct position for key
                while (j >= 0 && arr[j] < 0) {
                    arr[j + 1] = arr[j];
                    j--;
                }
                arr[j + 1] = key;
            }
        }
    }
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		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();
    }
    
    System.out.println(Arrays.toString(arr));
	}
}