import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        String b = sc.next();
        String A = "";
        String B = "";
        for (int i = 0; i < Integer.parseInt(b); i++) {
            A += a;
        }
        for (int i = 0; i < Integer.parseInt(a); i++) {
            B += b;
        }
        System.out.print((A.compareTo(B)) < 0 ? A : B);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        String b = sc.next();
        String A = "";
        String B = "";
        for (int i = 0; i < Integer.parseInt(b); i++) {
            A += a;
        }
        for (int i = 0; i < Integer.parseInt(a); i++) {
            B += b;
        }
        System.out.print((A.compareTo(B)) < 0 ? A : B);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        String b = sc.next();
        String A = "";
        String B = "";
        for (int i = 0; i < Integer.parseInt(b); i++) {
            A += a;
        }
        for (int i = 0; i < Integer.parseInt(a); i++) {
            B += b;
        }
        System.out.print((A.compareTo(B)) < 0 ? A : B);
    } main {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        String b = sc.next();
        String A = "";
        String B = "";
        for (int i = 0; i < Integer.parseInt(b); i++) {
            A += a;
        }
        for (int i = 0; i < Integer.parseInt(a); i++) {
            B += b;
        }
        System.out.print((A.compareTo(B)) < 0 ? A : B);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String a = sc.next(); a sc.next() sc.next sc String b = sc.next(); b sc.next() sc.next sc String A = ""; A "" String B = ""; B "" for (int i = 0; i < Integer.parseInt(b); i++) {
            A += a;
        } int i = 0; int i = 0; i 0 i < Integer.parseInt(b) i Integer.parseInt(b) Integer.parseInt Integer b i++ i++ i {
            A += a;
        } {
            A += a;
        } A += a A a for (int i = 0; i < Integer.parseInt(a); i++) {
            B += b;
        } int i = 0; int i = 0; i 0 i < Integer.parseInt(a) i Integer.parseInt(a) Integer.parseInt Integer a i++ i++ i {
            B += b;
        } {
            B += b;
        } B += b B b System.out.print((A.compareTo(B)) < 0 ? A : B) System.out.print System.out System System.out (A.compareTo(B)) < 0 ? A : B (A.compareTo(B)) < 0 (A.compareTo(B)) A.compareTo A B 0 A B String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        String b = sc.next();
        String A = "";
        String B = "";
        for (int i = 0; i < Integer.parseInt(b); i++) {
            A += a;
        }
        for (int i = 0; i < Integer.parseInt(a); i++) {
            B += b;
        }
        System.out.print((A.compareTo(B)) < 0 ? A : B);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        String b = sc.next();
        String A = "";
        String B = "";
        for (int i = 0; i < Integer.parseInt(b); i++) {
            A += a;
        }
        for (int i = 0; i < Integer.parseInt(a); i++) {
            B += b;
        }
        System.out.print((A.compareTo(B)) < 0 ? A : B);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        String b = sc.next();
        String A = "";
        String B = "";
        for (int i = 0; i < Integer.parseInt(b); i++) {
            A += a;
        }
        for (int i = 0; i < Integer.parseInt(a); i++) {
            B += b;
        }
        System.out.print((A.compareTo(B)) < 0 ? A : B);
    }
}