#include<bits/stdc++.h>
using namespace std;
string a,b,c,x,y,z;
int main () {
    cin>>a>>b>>c;

if(a>b and a>c) x=a;
   else if(b>a and b>c) x=b;
        else x=c;
cout<<x;

if((a>b and a<c) or (a<b and a>c)) y=a;
   else if((b>a and b<c) or (b<a and b>c)) y=b;
        else y=c;

cout<<y;

if(a<b and a<c) z=a;
   else if(b<a and b<c) z=b;
        else z=c;

cout<<z;

    return 0;
}