#include <iostream>
#include <sstream>
#include <string>
#include<stdlib.h>
using namespace std;
int main()
{
    unsigned long long a,b,c,max;
    unsigned long long *pn=new unsigned long long[6];
    int i;
    cin>>a>>b>>c;
    ostringstream u1; u1<<a<<b<<c; istringstream o1(u1.str()); o1>>pn[0];
    ostringstream u2; u2<<a<<c<<b; istringstream o2(u2.str()); o2>>pn[1];
    ostringstream u3; u3<<b<<a<<c; istringstream o3(u3.str()); o3>>pn[2];
    ostringstream u4; u4<<b<<c<<a; istringstream o4(u4.str()); o4>>pn[3];
    ostringstream u5; u5<<c<<a<<b; istringstream o5(u5.str()); o5>>pn[4];
    ostringstream u6; u6<<c<<b<<a; istringstream o6(u6.str()); o6>>pn[5];
    max=pn[0];
    for(i=1;i<6;i++){
    	if(pn[i]>max)
    	max=pn[i];
    	cout<<"pr"<<endl;
    	cout<<pn[i]<<endl;
	}
    cout<<max;
    system("pause");
}