#include <iostream>
#include <string>
#include <sstream>

using namespace std;

int main()
{
  int a,b,c;
  cin >> a >> b >> c;

  string a1,b1,c1;

  stringstream ss;

  ss << a;

  a1= ss.str();

  stringstream ss2;


  ss2 << b;

  b1= ss2.str();

  stringstream ss3;


  ss3 << c;

  c1= ss3.str();

  cout << a1 << endl;
  cout << b1 << endl;
  cout << c1 << endl;

  string o[6];

  o[0]= a1+b1+c1;
  o[1]= a1+c1+b1;
  o[2]= b1+a1+c1;
  o[3]= b1+c1+a1;
  o[4]= c1+a1+b1;
  o[5]= c1+b1+a1;

  string maxx = o[0];

  for (int i =0; i<5; i++)
  {
     if (o[i]>maxx) maxx=o[i];
  }

  cout << maxx << endl;


}