using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _1feladat
{
    class Program
    {
        static void Main(string[] args)
        {
            

            string a = Console.ReadLine();
            string b = Console.ReadLine();
            string[] b2 = b.Split(' ');
            if (a == "2")
            {
                Array.Sort(b2);
                Console.WriteLine(b2[0] + " " + b2[1]);
            }
            else
            {
                Array.Sort(b2);
                for(int i = 0; i != b2.Length; i++)
                {
                    Console.Write(b2[i] + " ");
                }
            }
            

        }
    }
}