#include<stdio.h>
#include<iostream>
using namespace std;
void BinInsertSort(int a[], int n)
{
int key, left, right, middle;
for (int i=1; i<n; i++)
{
key = a[i];
left = 0;
right = i-1;
while (left<=right)
{
middle = (left+right)/2;
if (a[middle]>key)
right = middle-1;
else
left = middle+1;
}
for(int j=i-1; j>=left; j--)
{
a[j+1] = a[j];
}
a[left] = key;
}
}
int main()
{
int a[10];
for(int i = 0;i < 10;i ++)
scanf("%d",&a[i]);
BinInsertSort(a,10);
for(int i = 0;i < 10;i ++)
cout << a[i] << " ";
cout << endl;
return 0;
}