import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        int n = scn.nextInt();
        StringBuilder nStr = new StringBuilder();
        int m = scn.nextInt();
        StringBuilder mStr = new StringBuilder();
        for(int i  = 0 ; i < n;i++){
            nStr.append(m) ;
        }
        for(int i = 0 ;i <m ; i ++) {
            mStr.append(n);
        }
        String[] arr = {nStr.toString(),mStr.toString()};
        Arrays.sort(arr);
        System.out.println(arr[0]);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        int n = scn.nextInt();
        StringBuilder nStr = new StringBuilder();
        int m = scn.nextInt();
        StringBuilder mStr = new StringBuilder();
        for(int i  = 0 ; i < n;i++){
            nStr.append(m) ;
        }
        for(int i = 0 ;i <m ; i ++) {
            mStr.append(n);
        }
        String[] arr = {nStr.toString(),mStr.toString()};
        Arrays.sort(arr);
        System.out.println(arr[0]);
    }
} Main public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        int n = scn.nextInt();
        StringBuilder nStr = new StringBuilder();
        int m = scn.nextInt();
        StringBuilder mStr = new StringBuilder();
        for(int i  = 0 ; i < n;i++){
            nStr.append(m) ;
        }
        for(int i = 0 ;i <m ; i ++) {
            mStr.append(n);
        }
        String[] arr = {nStr.toString(),mStr.toString()};
        Arrays.sort(arr);
        System.out.println(arr[0]);
    } main {
        Scanner scn = new Scanner(System.in);
        int n = scn.nextInt();
        StringBuilder nStr = new StringBuilder();
        int m = scn.nextInt();
        StringBuilder mStr = new StringBuilder();
        for(int i  = 0 ; i < n;i++){
            nStr.append(m) ;
        }
        for(int i = 0 ;i <m ; i ++) {
            mStr.append(n);
        }
        String[] arr = {nStr.toString(),mStr.toString()};
        Arrays.sort(arr);
        System.out.println(arr[0]);
    } Scanner scn = new Scanner(System.in); scn new Scanner(System.in) int n = scn.nextInt(); n scn.nextInt() scn.nextInt scn StringBuilder nStr = new StringBuilder(); nStr new StringBuilder() int m = scn.nextInt(); m scn.nextInt() scn.nextInt scn StringBuilder mStr = new StringBuilder(); mStr new StringBuilder() for(int i  = 0 ; i < n;i++){
            nStr.append(m) ;
        } int i  = 0 ; int i  = 0 ; i 0 i < n i n i++ i++ i {
            nStr.append(m) ;
        } {
            nStr.append(m) ;
        } nStr.append(m) nStr.append nStr m for(int i = 0 ;i <m ; i ++) {
            mStr.append(n);
        } int i = 0 ; int i = 0 ; i 0 i <m i m i ++ i ++ i {
            mStr.append(n);
        } {
            mStr.append(n);
        } mStr.append(n) mStr.append mStr n String[] arr = {nStr.toString(),mStr.toString()}; arr {nStr.toString(),mStr.toString()} nStr.toString() nStr.toString nStr mStr.toString() mStr.toString mStr Arrays.sort(arr) Arrays.sort Arrays arr System.out.println(arr[0]) System.out.println System.out System System.out arr[0] arr 0 String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        int n = scn.nextInt();
        StringBuilder nStr = new StringBuilder();
        int m = scn.nextInt();
        StringBuilder mStr = new StringBuilder();
        for(int i  = 0 ; i < n;i++){
            nStr.append(m) ;
        }
        for(int i = 0 ;i <m ; i ++) {
            mStr.append(n);
        }
        String[] arr = {nStr.toString(),mStr.toString()};
        Arrays.sort(arr);
        System.out.println(arr[0]);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        int n = scn.nextInt();
        StringBuilder nStr = new StringBuilder();
        int m = scn.nextInt();
        StringBuilder mStr = new StringBuilder();
        for(int i  = 0 ; i < n;i++){
            nStr.append(m) ;
        }
        for(int i = 0 ;i <m ; i ++) {
            mStr.append(n);
        }
        String[] arr = {nStr.toString(),mStr.toString()};
        Arrays.sort(arr);
        System.out.println(arr[0]);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        int n = scn.nextInt();
        StringBuilder nStr = new StringBuilder();
        int m = scn.nextInt();
        StringBuilder mStr = new StringBuilder();
        for(int i  = 0 ; i < n;i++){
            nStr.append(m) ;
        }
        for(int i = 0 ;i <m ; i ++) {
            mStr.append(n);
        }
        String[] arr = {nStr.toString(),mStr.toString()};
        Arrays.sort(arr);
        System.out.println(arr[0]);
    }
}
