import java.util.*;
import javax.lang.model.util.ElementScanner6;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        // 入力
        int a = sc.nextInt();
        int b = sc.nextInt();

        // 処理
        StringBuilder work = new StringBuilder();
        for (int i = 0; i < b; i++) {
            work.append(Integer.toString(a));
        }
        String aaa = work.toString();

        StringBuilder work1 = new StringBuilder();
        for (int i = 0; i < a; i++) {
            work1.append(Integer.toString(b));
        }
        String bbb = work1.toString();

        String out = aaa.compareTo(bbb) > 0 ? bbb : aaa;

        // 出力
        System.out.println(out);
    }
} import java.util.*; util.* java import javax.lang.model.util.ElementScanner6; ElementScanner6 javax.lang.model.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        // 入力
        int a = sc.nextInt();
        int b = sc.nextInt();

        // 処理
        StringBuilder work = new StringBuilder();
        for (int i = 0; i < b; i++) {
            work.append(Integer.toString(a));
        }
        String aaa = work.toString();

        StringBuilder work1 = new StringBuilder();
        for (int i = 0; i < a; i++) {
            work1.append(Integer.toString(b));
        }
        String bbb = work1.toString();

        String out = aaa.compareTo(bbb) > 0 ? bbb : aaa;

        // 出力
        System.out.println(out);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        // 入力
        int a = sc.nextInt();
        int b = sc.nextInt();

        // 処理
        StringBuilder work = new StringBuilder();
        for (int i = 0; i < b; i++) {
            work.append(Integer.toString(a));
        }
        String aaa = work.toString();

        StringBuilder work1 = new StringBuilder();
        for (int i = 0; i < a; i++) {
            work1.append(Integer.toString(b));
        }
        String bbb = work1.toString();

        String out = aaa.compareTo(bbb) > 0 ? bbb : aaa;

        // 出力
        System.out.println(out);
    } main {
        Scanner sc = new Scanner(System.in);

        // 入力
        int a = sc.nextInt();
        int b = sc.nextInt();

        // 処理
        StringBuilder work = new StringBuilder();
        for (int i = 0; i < b; i++) {
            work.append(Integer.toString(a));
        }
        String aaa = work.toString();

        StringBuilder work1 = new StringBuilder();
        for (int i = 0; i < a; i++) {
            work1.append(Integer.toString(b));
        }
        String bbb = work1.toString();

        String out = aaa.compareTo(bbb) > 0 ? bbb : aaa;

        // 出力
        System.out.println(out);
    } 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 work = new StringBuilder(); work new StringBuilder() for (int i = 0; i < b; i++) {
            work.append(Integer.toString(a));
        } int i = 0; int i = 0; i 0 i < b i b i++ i++ i {
            work.append(Integer.toString(a));
        } {
            work.append(Integer.toString(a));
        } work.append(Integer.toString(a)) work.append work Integer.toString(a) Integer.toString Integer a String aaa = work.toString(); aaa work.toString() work.toString work StringBuilder work1 = new StringBuilder(); work1 new StringBuilder() for (int i = 0; i < a; i++) {
            work1.append(Integer.toString(b));
        } int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
            work1.append(Integer.toString(b));
        } {
            work1.append(Integer.toString(b));
        } work1.append(Integer.toString(b)) work1.append work1 Integer.toString(b) Integer.toString Integer b String bbb = work1.toString(); bbb work1.toString() work1.toString work1 String out = aaa.compareTo(bbb) > 0 ? bbb : aaa; out aaa.compareTo(bbb) > 0 ? bbb : aaa aaa.compareTo(bbb) > 0 aaa.compareTo(bbb) aaa.compareTo aaa bbb 0 bbb aaa System.out.println(out) System.out.println System.out System System.out out String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        // 入力
        int a = sc.nextInt();
        int b = sc.nextInt();

        // 処理
        StringBuilder work = new StringBuilder();
        for (int i = 0; i < b; i++) {
            work.append(Integer.toString(a));
        }
        String aaa = work.toString();

        StringBuilder work1 = new StringBuilder();
        for (int i = 0; i < a; i++) {
            work1.append(Integer.toString(b));
        }
        String bbb = work1.toString();

        String out = aaa.compareTo(bbb) > 0 ? bbb : aaa;

        // 出力
        System.out.println(out);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        // 入力
        int a = sc.nextInt();
        int b = sc.nextInt();

        // 処理
        StringBuilder work = new StringBuilder();
        for (int i = 0; i < b; i++) {
            work.append(Integer.toString(a));
        }
        String aaa = work.toString();

        StringBuilder work1 = new StringBuilder();
        for (int i = 0; i < a; i++) {
            work1.append(Integer.toString(b));
        }
        String bbb = work1.toString();

        String out = aaa.compareTo(bbb) > 0 ? bbb : aaa;

        // 出力
        System.out.println(out);
    }
} Main
import java.util.*;
import javax.lang.model.util.ElementScanner6;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        // 入力
        int a = sc.nextInt();
        int b = sc.nextInt();

        // 処理
        StringBuilder work = new StringBuilder();
        for (int i = 0; i < b; i++) {
            work.append(Integer.toString(a));
        }
        String aaa = work.toString();

        StringBuilder work1 = new StringBuilder();
        for (int i = 0; i < a; i++) {
            work1.append(Integer.toString(b));
        }
        String bbb = work1.toString();

        String out = aaa.compareTo(bbb) > 0 ? bbb : aaa;

        // 出力
        System.out.println(out);
    }
}