import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        new Main(args);
    }

    public Main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        sc.close();
        String stra = a(a, b);
        String strb = a(b, a);
        System.out.print(stra.compareTo(strb) > 0 ? strb:stra);
    }

    String a(int a, int b) {
        String str1 = String.valueOf(a);
        StringBuilder str2 = new StringBuilder();
        for (int i=0;i<b;i++) {
            str2.append(str1);
        }
        return str2.toString();
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        new Main(args);
    }

    public Main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        sc.close();
        String stra = a(a, b);
        String strb = a(b, a);
        System.out.print(stra.compareTo(strb) > 0 ? strb:stra);
    }

    String a(int a, int b) {
        String str1 = String.valueOf(a);
        StringBuilder str2 = new StringBuilder();
        for (int i=0;i<b;i++) {
            str2.append(str1);
        }
        return str2.toString();
    }
} Main public static void main(String[] args) {
        new Main(args);
    } main {
        new Main(args);
    } new Main(args) String[] args args public Main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        sc.close();
        String stra = a(a, b);
        String strb = a(b, a);
        System.out.print(stra.compareTo(strb) > 0 ? strb:stra);
    } Main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        sc.close();
        String stra = a(a, b);
        String strb = a(b, a);
        System.out.print(stra.compareTo(strb) > 0 ? strb:stra);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc sc.close() sc.close sc String stra = a(a, b); stra a(a, b) a a b String strb = a(b, a); strb a(b, a) a b a System.out.print(stra.compareTo(strb) > 0 ? strb:stra) System.out.print System.out System System.out stra.compareTo(strb) > 0 ? strb:stra stra.compareTo(strb) > 0 stra.compareTo(strb) stra.compareTo stra strb 0 strb stra String[] args args String a(int a, int b) {
        String str1 = String.valueOf(a);
        StringBuilder str2 = new StringBuilder();
        for (int i=0;i<b;i++) {
            str2.append(str1);
        }
        return str2.toString();
    } a {
        String str1 = String.valueOf(a);
        StringBuilder str2 = new StringBuilder();
        for (int i=0;i<b;i++) {
            str2.append(str1);
        }
        return str2.toString();
    } String str1 = String.valueOf(a); str1 String.valueOf(a) String.valueOf String a StringBuilder str2 = new StringBuilder(); str2 new StringBuilder() for (int i=0;i<b;i++) {
            str2.append(str1);
        } int i=0; int i=0; i 0 i<b i b i++ i++ i {
            str2.append(str1);
        } {
            str2.append(str1);
        } str2.append(str1) str2.append str2 str1 return str2.toString(); str2.toString() str2.toString str2 int a a int b b public class Main {
    public static void main(String[] args) {
        new Main(args);
    }

    public Main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        sc.close();
        String stra = a(a, b);
        String strb = a(b, a);
        System.out.print(stra.compareTo(strb) > 0 ? strb:stra);
    }

    String a(int a, int b) {
        String str1 = String.valueOf(a);
        StringBuilder str2 = new StringBuilder();
        for (int i=0;i<b;i++) {
            str2.append(str1);
        }
        return str2.toString();
    }
} public class Main {
    public static void main(String[] args) {
        new Main(args);
    }

    public Main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        sc.close();
        String stra = a(a, b);
        String strb = a(b, a);
        System.out.print(stra.compareTo(strb) > 0 ? strb:stra);
    }

    String a(int a, int b) {
        String str1 = String.valueOf(a);
        StringBuilder str2 = new StringBuilder();
        for (int i=0;i<b;i++) {
            str2.append(str1);
        }
        return str2.toString();
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        new Main(args);
    }

    public Main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        sc.close();
        String stra = a(a, b);
        String strb = a(b, a);
        System.out.print(stra.compareTo(strb) > 0 ? strb:stra);
    }

    String a(int a, int b) {
        String str1 = String.valueOf(a);
        StringBuilder str2 = new StringBuilder();
        for (int i=0;i<b;i++) {
            str2.append(str1);
        }
        return str2.toString();
    }
}