#include<stdio.h>
#include<list>
#include<iostream>
using std::cout;
using std::cin;
using std::list;
main()
{
	long long a,b,c,rez;
	list<int> cifrea,cifreb,cifrec,max;
	cin>>a>>b>>c;
	while (a)
    {
        int cifra = a % 10;
        cifrea.push_front(cifra);
        a /= 10;
    }
    while (b)
    {
        int cifra = b % 10;
        cifreb.push_front(cifra);
        b /= 10;
    }
    while (c)
    {
        int cifra = c % 10;
        cifrec.push_front(cifra);
        c /= 10;
    }
    list<int>::iterator ia = cifrea.begin();
    list<int>::iterator ib = cifreb.begin();
    list<int>::iterator ic = cifrec.begin();

    if(cifrea.size()>cifreb.size())
    {
    	if(cifrea.size()>cifrec.size())
    	{
    	max=cifrea;
    	}
    	else
    	{
    		max=cifrec;
		}
	}
	if(cifreb.size()>cifrea.size())
    {
    	if(cifreb.size()>cifrec.size())
    	{
    	max=cifreb;
    	}
    	else
    	{
    		max=cifrec;
		}
	}
	if(cifrec.size()>cifreb.size())
    {
    	if(cifrec.size()>cifrea.size())
    	{
    	max=cifrec;
    	}
    	else
    	{
    		max=cifrea;
		}
	}
	list<int>::iterator im = max.begin();
    while(im != max.end())
    {
    	a=*ia;
    	b=*ib;
    	c=*ic;
    	if(ia==cifrea.end())
		{
			    a=0;
		}
		if(ib==cifreb.end())
			{
			    b=0;
			}
		if(ic==cifrec.end())
			{
			    c=0;
			}
	    {
	    	
			if(a > b && a > c)
			{
				if(b>c)
				{
					for (list<int>::iterator i = cifrea.begin(); i != cifrea.end(); ++i)
					{
			    		cout << *i;
			    	}
			    	for (list<int>::iterator i = cifreb.begin(); i != cifreb.end(); ++i)
					{
			    		cout << *i;
			    	}
			    	for (list<int>::iterator i = cifrec.begin(); i != cifrec.end(); ++i)
					{
			    		cout << *i;
			    	}
			    	break;
				}
				else if(b < c)
				{
					for (list<int>::iterator i = cifrea.begin(); i != cifrea.end(); ++i)
					{
			    		cout << *i;
			    	}
			    	for (list<int>::iterator i = cifrec.begin(); i != cifrec.end(); ++i)
					{
			    		cout << *i;
			    	}
			    	for (list<int>::iterator i = cifreb.begin(); i != cifreb.end(); ++i)
					{
			    		cout << *i;
			    	}	
			    	break;
				}
				else
				{
					ib++;
					ic++;
				}
			}
		    else if (b > a && b > c)
		    {
		    	if(a > c)
		    	{
			    	for (list<int>::iterator i = cifreb.begin(); i != cifreb.end(); ++i)
					{
			    		cout << *i;
			    	}
					for (list<int>::iterator i = cifrea.begin(); i != cifrea.end(); ++i)
					{
			    		cout << *i;
			    	}
					for (list<int>::iterator i = cifrec.begin(); i != cifrec.end(); ++i)
					{
			    		cout << *i;
			    	}
					break;	
				}
				else if(a<c)
				{	
					for (list<int>::iterator i = cifreb.begin(); i != cifreb.end(); ++i)
					{
			    		cout << *i;
			    	}
			    	for (list<int>::iterator i = cifrec.begin(); i != cifrec.end(); ++i)
					{
			    		cout << *i;
			    	}
					for (list<int>::iterator i = cifrea.begin(); i != cifrea.end(); ++i)
					{
			    		cout << *i;
			    	}
			    	break;
				}
				else
				{
					ia++;
					ic++;
				}
			}
		    else if (c > a && c > b)
		    {
		    	if(a > b)
		    	{
		    		for (list<int>::iterator i = cifrec.begin(); i != cifrec.end(); ++i)
					{
			    		cout << *i;
			    	}
					for (list<int>::iterator i = cifrea.begin(); i != cifrea.end(); ++i)
					{
			    		cout << *i;
			    	}
					for (list<int>::iterator i = cifreb.begin(); i != cifreb.end(); ++i)
					{
			    		cout << *i;
			    	}
					break;	
				}
				else if(a < b)
				{
					for (list<int>::iterator i = cifrec.begin(); i != cifrec.end(); ++i)
					{
			    		cout << *i;
			    	}
			    	for (list<int>::iterator i = cifreb.begin(); i != cifreb.end(); ++i)
					{
			    		cout << *i;
			    	}
			    	for (list<int>::iterator i = cifrea.begin(); i != cifrea.end(); ++i)
					{
			    		cout << *i;
			    	}
			    	break;
				}
				else
				{
					ia++;
					ib++;
				}
			}
		    else
		    {
		    	ia++;
		    	ib++;
		    	ic++;
		    	im++;
			}
		}
	}
}