#include <iostream>
#include <string>
#include <stdlib.h>

using namespace std;

main()
{
   string a, b, c, br1, br2, br3, br4, br5, br6, br;

   cin >> a;
   cin >> b;
   cin >> c;

  br1=a+b+c;
  br2=a+c+b;
  br3=b+a+c;
  br4=b+c+a;
  br5=c+a+b;
  br6=c+b+a;

  br=br1;

  if(br2.compare(br)>0)
  {
      br=br2;
  }
  if(br3.compare(br)>0)
  {
      br=br3;
  }
  if(br4.compare(br)>0)
  {
      br=br4;
  }
  if(br5.compare(br)>0)
  {
      br=br5;
  }
  if(br6.compare(br)>0)
  {
      br=br6;
  }

  cout << br;

}