package nadovezivanje;

import java.util.Scanner;

public class Nadovezivanje {

    public static void main(String[] args) {
        int A, B, C;
        Scanner in = new Scanner(System.in);
        A = in.nextInt();
        B = in.nextInt();
        C = in.nextInt();
        int a[] = cifre(A);
        int b[] = cifre(B);
        int c[] = cifre(C);
        int m = Math.max(a.length, b.length);
        if (m < c.length) {
            m = c.length;
        }
        
        for (int i = 0; i < m; i++) {
            if (a[i] > b[i] && a[i] > c[i]) {
                if (b[i] > c[i]) {
                    System.out.print(A + "" + B + "" + C);
                    break;
                } else {
                    System.out.print(A + "" + C + "" + B);
                    break;
                }
            } else if (c[i] > b[i] && c[i] > a[i]) {
                if (a[i] > b[i]) {
                    System.out.print(C + "" + A + "" + B);
                    break;
                } else {
                    System.out.print(C + "" + B + "" + A);
                    break;
                }
            } else if (b[i] > a[i] && b[i] > c[i]) {
                if (a[i] > c[i]) {
                    System.out.print(B + "" + A + "" + C);
                    break;
                } else {
                    System.out.print(B + "" + C + "" + A);
                    break;
                }
            } else if (a[i] == b[i] && a[i] > c[i]) {
                System.out.print(A + "" + B + "" + C);
                break;
            } else if (a[i] == b[i] && a[i] < c[i]) {
                System.out.print(C + "" + A + "" + B);
           break;
             } else if (c[i] == b[i] && b[i] > a[i]) {
                System.out.print(B + "" + C + "" + A);
                break;
            } else if (c[i] == b[i] && b[i] < a[i]) {
                System.out.print(A + "" + B + "" + C);  
                break;
            }
              else if (c[i] == a[i] && a[i] > b[i]) {
                System.out.print(A + "" + C + "" + B);  
                break;
            }
              else if (c[i] == a[i] && a[i] < b[i]) {
                System.out.print(B + "" + C + "" + A);  
                break;
            }
            else if(a[i]==b[i] && a[i]==c[i]){
            System.out.print(A + "" + B + "" + C);
            break;
            }
    }
    }
    static int[] cifre(int x) {
        int len = Integer.toString(x).length();
        int[] a = new int[len];
        for (int i = len - 1; i >= 0; i--) {
            a[i] = x % 10;
            x /= 10;
        }

        return a;
    }

}