/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package nadovezivanje;

import java.util.Scanner;

/**
 *
 * @author Korisnik
 */
public class Nadovezivanje {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc=new Scanner(System.in);
        int A= sc.nextInt();
        int B= sc.nextInt();
        int C= sc.nextInt();
        
        int a1=A;
        int b1=B;
        int c1=C;
        
        while(a1!=b1&&a1>=10&&b1>=10&&a1!=c1&b1!=c1&&c1>=10){
            a1=a1/10;
            b1=b1/10;
            c1=c1/10;}
        
        if(a1<10){
            while(b1!=c1&&b1>=10&&c1>=10){
                b1=b1/10;
                c1=c1/10;}
            
            if(b1<10){
                while(c1>=10){
                    c1=c1/10;}
                }
            
            if(c1<10){
                while(b1>=10){
                    b1=b1/10;}
                }
            }
        
        if(b1<10){
            while(a1!=c1&&a1>=10&&c1>=10){
                a1=a1/10;
                b1=b1/10;}
            
            if(a1<10){
                while(c1>=10){
                    c1=c1/10;}
                }
            if(c1<10){
                while(a1>=10){
                    a1=a1/10;}
                }
            }
        
        if(c1<10){
            while(a1!=b1&&a1>=10&&b1>=10){
                a1=a1/10;
                b1=b1/10;}
            if(a1<10){
                while(b1>=10){
                    b1=b1/10;}
                }
            if(b1<10){
                while(a1>=10){
                    a1=a1/10;}
                }
            }
        
        
        if(a1>=b1&&a1>=c1){
            if(b1>=c1){
                System.out.println(A+""+B+""+C);}
            else{
                System.out.println(A+""+C+""+B);}}
        
        if(b1>a1&&b1>=c1){
            if(a1>=c1){
                System.out.println(B+""+A+""+C);}
            else{
                System.out.println(B+""+C+""+A);}}
        
        if(c1>=a1&&c1>b1){
            if(a1>=b1){
                System.out.println(C+""+A+""+B);}
            else{
                System.out.println(C+""+B+""+A);}}
       
                        
        
    }
    
}