import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int a = s.nextInt();
        int b = s.nextInt();
        String as = Integer.toString(a);
        String bs = Integer.toString(b);
        StringBuilder str = new StringBuilder(b);
        for(int i =0;i<b;i++){
            str.append(as);
        }
        as = str.toString();   
        str = new StringBuilder("");
        for(int i=0;i<a;i++){
            str.append(bs);
        }
        bs = str.toString();
        System.out.println(as.compareTo(bs)<0?as:bs);
        s.close();
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int a = s.nextInt();
        int b = s.nextInt();
        String as = Integer.toString(a);
        String bs = Integer.toString(b);
        StringBuilder str = new StringBuilder(b);
        for(int i =0;i<b;i++){
            str.append(as);
        }
        as = str.toString();   
        str = new StringBuilder("");
        for(int i=0;i<a;i++){
            str.append(bs);
        }
        bs = str.toString();
        System.out.println(as.compareTo(bs)<0?as:bs);
        s.close();
    }
} Main public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int a = s.nextInt();
        int b = s.nextInt();
        String as = Integer.toString(a);
        String bs = Integer.toString(b);
        StringBuilder str = new StringBuilder(b);
        for(int i =0;i<b;i++){
            str.append(as);
        }
        as = str.toString();   
        str = new StringBuilder("");
        for(int i=0;i<a;i++){
            str.append(bs);
        }
        bs = str.toString();
        System.out.println(as.compareTo(bs)<0?as:bs);
        s.close();
    } main {
        Scanner s = new Scanner(System.in);
        int a = s.nextInt();
        int b = s.nextInt();
        String as = Integer.toString(a);
        String bs = Integer.toString(b);
        StringBuilder str = new StringBuilder(b);
        for(int i =0;i<b;i++){
            str.append(as);
        }
        as = str.toString();   
        str = new StringBuilder("");
        for(int i=0;i<a;i++){
            str.append(bs);
        }
        bs = str.toString();
        System.out.println(as.compareTo(bs)<0?as:bs);
        s.close();
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) int a = s.nextInt(); a s.nextInt() s.nextInt s int b = s.nextInt(); b s.nextInt() s.nextInt s String as = Integer.toString(a); as Integer.toString(a) Integer.toString Integer a String bs = Integer.toString(b); bs Integer.toString(b) Integer.toString Integer b StringBuilder str = new StringBuilder(b); str new StringBuilder(b) for(int i =0;i<b;i++){
            str.append(as);
        } int i =0; int i =0; i 0 i<b i b i++ i++ i {
            str.append(as);
        } {
            str.append(as);
        } str.append(as) str.append str as as = str.toString() as str.toString() str.toString str str = new StringBuilder("") str new StringBuilder("") for(int i=0;i<a;i++){
            str.append(bs);
        } int i=0; int i=0; i 0 i<a i a i++ i++ i {
            str.append(bs);
        } {
            str.append(bs);
        } str.append(bs) str.append str bs bs = str.toString() bs str.toString() str.toString str System.out.println(as.compareTo(bs)<0?as:bs) System.out.println System.out System System.out as.compareTo(bs)<0?as:bs as.compareTo(bs)<0 as.compareTo(bs) as.compareTo as bs 0 as bs s.close() s.close s String[] args args
import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int a = s.nextInt();
        int b = s.nextInt();
        String as = Integer.toString(a);
        String bs = Integer.toString(b);
        StringBuilder str = new StringBuilder(b);
        for(int i =0;i<b;i++){
            str.append(as);
        }
        as = str.toString();   
        str = new StringBuilder("");
        for(int i=0;i<a;i++){
            str.append(bs);
        }
        bs = str.toString();
        System.out.println(as.compareTo(bs)<0?as:bs);
        s.close();
    }
}