#include<iostream>
#include<stdio.h>
#include<stdlib.h>
#include<algorithm>
using namespace std;
int S[9];
void Partition(int low,int high,int &pivotpoint)
{
int pivotitem=S[low];
int j=low;
for(int i=low+1;i<=high;i++)//自己差点忘掉 = high
{
if(S[i]<pivotitem)
{
j++;
swap(S[i],S[j]);
}
}
pivotpoint=j;
swap(S[j],S[low]);
}
void quicksort(int low,int high)
{
int pivotpoint;
if(low<high)
{
Partition(low,high,pivotpoint);
quicksort(low,pivotpoint-1);
quicksort(pivotpoint+1,high);
}
}
int main()
{
S[0]=0;
for(int i=1;i<=8;i++)
{
cin>>S[i];
}
quicksort(1,8);
for(int i=1;i<=8;i++)
{
cout<<S[i]<<endl;
}
return 0;
}