import java.util.Arrays;
import java.util.Scanner;

public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        Integer a = Integer.parseInt(sc.next());
        Integer b = Integer.parseInt(sc.next());

        // 主処理
        String strA = "";
        for (int i = 0; i < b; i++) {
            strA += a;
        }
        String strB = "";
        for (int i = 0; i < a; i++) {
            strB += b;
        }

        String[] arr = new String[]{strA, strB};
        Arrays.sort(arr);

        String result = arr[0];

        // 出力
        System.out.println(result);
        sc.close();
    }
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        Integer a = Integer.parseInt(sc.next());
        Integer b = Integer.parseInt(sc.next());

        // 主処理
        String strA = "";
        for (int i = 0; i < b; i++) {
            strA += a;
        }
        String strB = "";
        for (int i = 0; i < a; i++) {
            strB += b;
        }

        String[] arr = new String[]{strA, strB};
        Arrays.sort(arr);

        String result = arr[0];

        // 出力
        System.out.println(result);
        sc.close();
    }
} Main public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        Integer a = Integer.parseInt(sc.next());
        Integer b = Integer.parseInt(sc.next());

        // 主処理
        String strA = "";
        for (int i = 0; i < b; i++) {
            strA += a;
        }
        String strB = "";
        for (int i = 0; i < a; i++) {
            strB += b;
        }

        String[] arr = new String[]{strA, strB};
        Arrays.sort(arr);

        String result = arr[0];

        // 出力
        System.out.println(result);
        sc.close();
    } main {

        // 入力
        Scanner sc = new Scanner(System.in);
        Integer a = Integer.parseInt(sc.next());
        Integer b = Integer.parseInt(sc.next());

        // 主処理
        String strA = "";
        for (int i = 0; i < b; i++) {
            strA += a;
        }
        String strB = "";
        for (int i = 0; i < a; i++) {
            strB += b;
        }

        String[] arr = new String[]{strA, strB};
        Arrays.sort(arr);

        String result = arr[0];

        // 出力
        System.out.println(result);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) Integer a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc Integer b = Integer.parseInt(sc.next()); b Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc String strA = ""; strA "" for (int i = 0; i < b; i++) {
            strA += a;
        } int i = 0; int i = 0; i 0 i < b i b i++ i++ i {
            strA += a;
        } {
            strA += a;
        } strA += a strA a String strB = ""; strB "" for (int i = 0; i < a; i++) {
            strB += b;
        } int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
            strB += b;
        } {
            strB += b;
        } strB += b strB b String[] arr = new String[]{strA, strB}; arr new String[]{strA, strB} Arrays.sort(arr) Arrays.sort Arrays arr String result = arr[0]; result arr[0] arr 0 System.out.println(result) System.out.println System.out System System.out result sc.close() sc.close sc String args[] args public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        Integer a = Integer.parseInt(sc.next());
        Integer b = Integer.parseInt(sc.next());

        // 主処理
        String strA = "";
        for (int i = 0; i < b; i++) {
            strA += a;
        }
        String strB = "";
        for (int i = 0; i < a; i++) {
            strB += b;
        }

        String[] arr = new String[]{strA, strB};
        Arrays.sort(arr);

        String result = arr[0];

        // 出力
        System.out.println(result);
        sc.close();
    }
} public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        Integer a = Integer.parseInt(sc.next());
        Integer b = Integer.parseInt(sc.next());

        // 主処理
        String strA = "";
        for (int i = 0; i < b; i++) {
            strA += a;
        }
        String strB = "";
        for (int i = 0; i < a; i++) {
            strB += b;
        }

        String[] arr = new String[]{strA, strB};
        Arrays.sort(arr);

        String result = arr[0];

        // 出力
        System.out.println(result);
        sc.close();
    }
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        Integer a = Integer.parseInt(sc.next());
        Integer b = Integer.parseInt(sc.next());

        // 主処理
        String strA = "";
        for (int i = 0; i < b; i++) {
            strA += a;
        }
        String strB = "";
        for (int i = 0; i < a; i++) {
            strB += b;
        }

        String[] arr = new String[]{strA, strB};
        Arrays.sort(arr);

        String result = arr[0];

        // 出力
        System.out.println(result);
        sc.close();
    }
}
