import java.util.*;

public class Main {
    public static void main(String args[]) throws Exception {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        StringBuilder sbA = new StringBuilder();
        for(int i = 0; i < a; i++)
        	sbA.append(b);

        StringBuilder sbB = new StringBuilder();
        for(int i = 0; i < b; i++)
        	sbB.append(a);
        String strA = sbA.toString();
        String strB = sbB.toString();
        System.out.println(strA.compareTo(strB) < 0 ? strA : strB);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String args[]) throws Exception {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        StringBuilder sbA = new StringBuilder();
        for(int i = 0; i < a; i++)
        	sbA.append(b);

        StringBuilder sbB = new StringBuilder();
        for(int i = 0; i < b; i++)
        	sbB.append(a);
        String strA = sbA.toString();
        String strB = sbB.toString();
        System.out.println(strA.compareTo(strB) < 0 ? strA : strB);
    }
} Main public static void main(String args[]) throws Exception {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        StringBuilder sbA = new StringBuilder();
        for(int i = 0; i < a; i++)
        	sbA.append(b);

        StringBuilder sbB = new StringBuilder();
        for(int i = 0; i < b; i++)
        	sbB.append(a);
        String strA = sbA.toString();
        String strB = sbB.toString();
        System.out.println(strA.compareTo(strB) < 0 ? strA : strB);
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        StringBuilder sbA = new StringBuilder();
        for(int i = 0; i < a; i++)
        	sbA.append(b);

        StringBuilder sbB = new StringBuilder();
        for(int i = 0; i < b; i++)
        	sbB.append(a);
        String strA = sbA.toString();
        String strB = sbB.toString();
        System.out.println(strA.compareTo(strB) < 0 ? strA : strB);
    } 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 StringBuilder sbA = new StringBuilder(); sbA new StringBuilder() for(int i = 0; i < a; i++)
        	sbA.append(b); int i = 0; int i = 0; i 0 i < a i a i++ i++ i sbA.append(b); sbA.append(b) sbA.append sbA b StringBuilder sbB = new StringBuilder(); sbB new StringBuilder() for(int i = 0; i < b; i++)
        	sbB.append(a); int i = 0; int i = 0; i 0 i < b i b i++ i++ i sbB.append(a); sbB.append(a) sbB.append sbB a String strA = sbA.toString(); strA sbA.toString() sbA.toString sbA String strB = sbB.toString(); strB sbB.toString() sbB.toString sbB System.out.println(strA.compareTo(strB) < 0 ? strA : strB) System.out.println System.out System System.out strA.compareTo(strB) < 0 ? strA : strB strA.compareTo(strB) < 0 strA.compareTo(strB) strA.compareTo strA strB 0 strA strB String args[] args public class Main {
    public static void main(String args[]) throws Exception {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        StringBuilder sbA = new StringBuilder();
        for(int i = 0; i < a; i++)
        	sbA.append(b);

        StringBuilder sbB = new StringBuilder();
        for(int i = 0; i < b; i++)
        	sbB.append(a);
        String strA = sbA.toString();
        String strB = sbB.toString();
        System.out.println(strA.compareTo(strB) < 0 ? strA : strB);
    }
} public class Main {
    public static void main(String args[]) throws Exception {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        StringBuilder sbA = new StringBuilder();
        for(int i = 0; i < a; i++)
        	sbA.append(b);

        StringBuilder sbB = new StringBuilder();
        for(int i = 0; i < b; i++)
        	sbB.append(a);
        String strA = sbA.toString();
        String strB = sbB.toString();
        System.out.println(strA.compareTo(strB) < 0 ? strA : strB);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String args[]) throws Exception {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        StringBuilder sbA = new StringBuilder();
        for(int i = 0; i < a; i++)
        	sbA.append(b);

        StringBuilder sbB = new StringBuilder();
        for(int i = 0; i < b; i++)
        	sbB.append(a);
        String strA = sbA.toString();
        String strB = sbB.toString();
        System.out.println(strA.compareTo(strB) < 0 ? strA : strB);
    }
}
