#include<stdio.h>
#include<list>
#include<iostream>
using std::cout;
using std::cin;
using std::list;
main()
{
	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())
    {
    	if(ia==cifrea.end())
		{
			    *ia=0;
		}
		if(ib==cifreb.end())
			{
			    *ib=0;
			}
		if(ic==cifrec.end())
			{
			    *ic=0;
			}
	    {
	    	
			if(*ia > *ib && *ia > *ic)
			{
				if(*ib>*ic)
				{
					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(*ib < *ic)
				{
					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 (*ib > *ia && *ib > *ic)
		    {
		    	if(*ia > *ic)
		    	{
			    	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(*ia<*ic)
				{	
					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 (*ic > *ia && *ic > *ib)
		    {
		    	if(*ia > *ib)
		    	{
		    		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(*ia < *ib)
				{
					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++;
			}
		}
	}
}