#include <bits/stdc++.h>

using namespace std;
string s1, s2, s3, smaxx, sminn, sr;
long long n, d, x, y, z;
char c;
long long br1 = 0, br2 = 0, b, a, res = 0, sum = 0, digitsum = 0, j = 1, k =
  1, dif1 = 0, dif2 = 0;
int
main ()
{

  int t;
  // cin >> t >> a;
  cin >> s1 >> s2 >> s3;
  // while (t--)
  //br1++;
  //br2++;



  br1 = 0;
  br2 = 0;
  // min i max, smin i smax

  // max(s1,s2,s3)=smaxx;
  // min(s1,s2,s3)=sminn;

// naci srednji clan

  if (s1 = maxx and s3 = minn)
    s2 = sr;
  else if (s1 = minn and s3 = maxx)
    s2 = sr;
  else if (s2 = maxx and s3 = minn)
    s1 = sr;
  else if (s2 = minn and s3 = maxx)
    s1 = sr;
  else if (s1 = maxx and s2 = minn)
    s3 = sr;
  else if (s2 = maxx and s1 = minn)
    s3 = sr;

  if (c + b + a > a + b + c and c + b + a> a+c+b and c+b+a>b+a+c and c+b+a>b+c+a and c+b+a>c+a+b) cout << c << b << a << endl;
  else if (c + a + b > a + b + c and c + a+ b> a+c+b and c+a+b>b+a+c and c+a+b>b+c+a and c+a+b>c+b+a) cout << c << a << b << endl;)
  else if (a + b + c > c + b + a and a + b + c > a+c+b and a + b + c >b+a+c and a + b + c >b+c+a and a + b + c >c+a+b) cout << a << b << c << endl;)
  else if (a + c + b > a + b + c and a + c+ b> c+b+a and a+c+b>b+a+c and a+c+b>b+c+a and a+c+b>c+b+a) cout << a << c << b << endl;)
  else if (b + a + c > a + b + c and b+a+c> a+c+b and b+a+c>c+a+b and b+a+c>b+c+a and b+a+c>c+b+a) cout << b << a << c << endl;)
  else if (b + c + a > a + b + c and b+c+a> a+c+b and b+c+a>b+a+c and b+c+a>c+a+b and b+c+a>c+b+a) cout << b << c<< a << endl;)


//  br1 = 0;
    // br2 = 0;



    return 0;
}