#include<iostream>
using namespace std;
int main(){
int a,b,c,d,e,f;
cin>>a>>b>>c>>d>>e;
if(a<b){f=a;a=b;b=f;}
if(a<c){f=a;a=c;c=f;}
if(a<d){f=a;a=d;d=f;}
if(a<e){f=a;a=e;e=f;}
if(b<c){f=b;b=c;c=f;}
if(b<d){f=b;b=d;d=f;}
if(b<e){f=b;b=e;e=f;}
if(c<d){f=c;c=d;d=f;}
if(c<e){f=c;c=e;e=f;}
if(d<e){f=d;d=e;e=f;}
cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<endl;
return 0;
}