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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            int[] niz = new int[n];

            string s=Console.ReadLine();
            string[] s1=s.Split(' ');

            for (int i = 0; i < n; i++)
            {
                niz[i] = int.Parse(s1[i]); 
            
            }
            if (n == 2)
            {
                int x = niz[0];
                niz[0] = niz[1];
                niz[1] = x;
            }
            else 
            {
 
                for(int i=0;i<n;i++)
                {int x=niz[i];
                    for (int j = i + 1; j < n; j++)
                    {
                        if (niz[i] < niz[j])
                        {
                            int a = niz[i];
                            niz[i] = niz[j];
                            niz[j] = a;
                            break;
                        }
                    
                    }
                    if (x != niz[i])
                    { break; }
                
                }

            }

            for (int i = 0; i < n; i++)
            {
                Console.Write("{0} ", niz[i]);
            
            }
            


        }
    }
}