import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        StringBuilder sba = new StringBuilder();
        StringBuilder sbb = new StringBuilder();
        for (int i = 0; i < b; i++) {
            sba.append(a);
        }
        for (int i = 0; i < a; i++) {
            sbb.append(b);
        }

        System.out.println(compareStr(sba.toString(), sbb.toString()));
        sc.close();
    }

    private static String compareStr(String a, String b) {
        int i = a.compareTo(b);
        if (i <= -1) {
            return a;
        }
        if (i >= 1) {
            return b;
        } else {
            return a;
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        StringBuilder sba = new StringBuilder();
        StringBuilder sbb = new StringBuilder();
        for (int i = 0; i < b; i++) {
            sba.append(a);
        }
        for (int i = 0; i < a; i++) {
            sbb.append(b);
        }

        System.out.println(compareStr(sba.toString(), sbb.toString()));
        sc.close();
    }

    private static String compareStr(String a, String b) {
        int i = a.compareTo(b);
        if (i <= -1) {
            return a;
        }
        if (i >= 1) {
            return b;
        } else {
            return a;
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        StringBuilder sba = new StringBuilder();
        StringBuilder sbb = new StringBuilder();
        for (int i = 0; i < b; i++) {
            sba.append(a);
        }
        for (int i = 0; i < a; i++) {
            sbb.append(b);
        }

        System.out.println(compareStr(sba.toString(), sbb.toString()));
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        StringBuilder sba = new StringBuilder();
        StringBuilder sbb = new StringBuilder();
        for (int i = 0; i < b; i++) {
            sba.append(a);
        }
        for (int i = 0; i < a; i++) {
            sbb.append(b);
        }

        System.out.println(compareStr(sba.toString(), sbb.toString()));
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int b = Integer.parseInt(sc.next()); b Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc StringBuilder sba = new StringBuilder(); sba new StringBuilder() StringBuilder sbb = new StringBuilder(); sbb new StringBuilder() for (int i = 0; i < b; i++) {
            sba.append(a);
        } int i = 0; int i = 0; i 0 i < b i b i++ i++ i {
            sba.append(a);
        } {
            sba.append(a);
        } sba.append(a) sba.append sba a for (int i = 0; i < a; i++) {
            sbb.append(b);
        } int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
            sbb.append(b);
        } {
            sbb.append(b);
        } sbb.append(b) sbb.append sbb b System.out.println(compareStr(sba.toString(), sbb.toString())) System.out.println System.out System System.out compareStr(sba.toString(), sbb.toString()) compareStr sba.toString() sba.toString sba sbb.toString() sbb.toString sbb sc.close() sc.close sc String[] args args private static String compareStr(String a, String b) {
        int i = a.compareTo(b);
        if (i <= -1) {
            return a;
        }
        if (i >= 1) {
            return b;
        } else {
            return a;
        }
    } compareStr {
        int i = a.compareTo(b);
        if (i <= -1) {
            return a;
        }
        if (i >= 1) {
            return b;
        } else {
            return a;
        }
    } int i = a.compareTo(b); i a.compareTo(b) a.compareTo a b if (i <= -1) {
            return a;
        } i <= -1 i -1 1 {
            return a;
        } return a; a if (i >= 1) {
            return b;
        } else {
            return a;
        } i >= 1 i 1 {
            return b;
        } return b; b {
            return a;
        } return a; a String a a String b b public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        StringBuilder sba = new StringBuilder();
        StringBuilder sbb = new StringBuilder();
        for (int i = 0; i < b; i++) {
            sba.append(a);
        }
        for (int i = 0; i < a; i++) {
            sbb.append(b);
        }

        System.out.println(compareStr(sba.toString(), sbb.toString()));
        sc.close();
    }

    private static String compareStr(String a, String b) {
        int i = a.compareTo(b);
        if (i <= -1) {
            return a;
        }
        if (i >= 1) {
            return b;
        } else {
            return a;
        }
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        StringBuilder sba = new StringBuilder();
        StringBuilder sbb = new StringBuilder();
        for (int i = 0; i < b; i++) {
            sba.append(a);
        }
        for (int i = 0; i < a; i++) {
            sbb.append(b);
        }

        System.out.println(compareStr(sba.toString(), sbb.toString()));
        sc.close();
    }

    private static String compareStr(String a, String b) {
        int i = a.compareTo(b);
        if (i <= -1) {
            return a;
        }
        if (i >= 1) {
            return b;
        } else {
            return a;
        }
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        StringBuilder sba = new StringBuilder();
        StringBuilder sbb = new StringBuilder();
        for (int i = 0; i < b; i++) {
            sba.append(a);
        }
        for (int i = 0; i < a; i++) {
            sbb.append(b);
        }

        System.out.println(compareStr(sba.toString(), sbb.toString()));
        sc.close();
    }

    private static String compareStr(String a, String b) {
        int i = a.compareTo(b);
        if (i <= -1) {
            return a;
        }
        if (i >= 1) {
            return b;
        } else {
            return a;
        }
    }
}
