import java.util.*;

public class Main {
    public static void main(String... args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();

        List<String> list = new ArrayList<>();

        StringBuilder sba = new StringBuilder();
        for (int i=0; i < a; i++) {
            sba.append(b);
        }
        list.add(sba.toString());

        StringBuilder sbb = new StringBuilder();
        for (int i=0; i < b; i++) {
            sbb.append(a);
        }
        list.add(sbb.toString());

        list.sort(Comparator.naturalOrder());

        System.out.println(list.get(0));
    }
} import java.util.*; util.* java public class Main {
    public static void main(String... args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();

        List<String> list = new ArrayList<>();

        StringBuilder sba = new StringBuilder();
        for (int i=0; i < a; i++) {
            sba.append(b);
        }
        list.add(sba.toString());

        StringBuilder sbb = new StringBuilder();
        for (int i=0; i < b; i++) {
            sbb.append(a);
        }
        list.add(sbb.toString());

        list.sort(Comparator.naturalOrder());

        System.out.println(list.get(0));
    }
} Main public static void main(String... args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();

        List<String> list = new ArrayList<>();

        StringBuilder sba = new StringBuilder();
        for (int i=0; i < a; i++) {
            sba.append(b);
        }
        list.add(sba.toString());

        StringBuilder sbb = new StringBuilder();
        for (int i=0; i < b; i++) {
            sbb.append(a);
        }
        list.add(sbb.toString());

        list.sort(Comparator.naturalOrder());

        System.out.println(list.get(0));
    } main {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();

        List<String> list = new ArrayList<>();

        StringBuilder sba = new StringBuilder();
        for (int i=0; i < a; i++) {
            sba.append(b);
        }
        list.add(sba.toString());

        StringBuilder sbb = new StringBuilder();
        for (int i=0; i < b; i++) {
            sbb.append(a);
        }
        list.add(sbb.toString());

        list.sort(Comparator.naturalOrder());

        System.out.println(list.get(0));
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner List<String> list = new ArrayList<>(); list new ArrayList<>() StringBuilder sba = new StringBuilder(); sba new StringBuilder() for (int i=0; i < a; i++) {
            sba.append(b);
        } int i=0; int i=0; i 0 i < a i a i++ i++ i {
            sba.append(b);
        } {
            sba.append(b);
        } sba.append(b) sba.append sba b list.add(sba.toString()) list.add list sba.toString() sba.toString sba StringBuilder sbb = new StringBuilder(); sbb new StringBuilder() for (int i=0; i < b; i++) {
            sbb.append(a);
        } int i=0; int i=0; i 0 i < b i b i++ i++ i {
            sbb.append(a);
        } {
            sbb.append(a);
        } sbb.append(a) sbb.append sbb a list.add(sbb.toString()) list.add list sbb.toString() sbb.toString sbb list.sort(Comparator.naturalOrder()) list.sort list Comparator.naturalOrder() Comparator.naturalOrder Comparator System.out.println(list.get(0)) System.out.println System.out System System.out list.get(0) list.get list 0 String... args args public class Main {
    public static void main(String... args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();

        List<String> list = new ArrayList<>();

        StringBuilder sba = new StringBuilder();
        for (int i=0; i < a; i++) {
            sba.append(b);
        }
        list.add(sba.toString());

        StringBuilder sbb = new StringBuilder();
        for (int i=0; i < b; i++) {
            sbb.append(a);
        }
        list.add(sbb.toString());

        list.sort(Comparator.naturalOrder());

        System.out.println(list.get(0));
    }
} public class Main {
    public static void main(String... args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();

        List<String> list = new ArrayList<>();

        StringBuilder sba = new StringBuilder();
        for (int i=0; i < a; i++) {
            sba.append(b);
        }
        list.add(sba.toString());

        StringBuilder sbb = new StringBuilder();
        for (int i=0; i < b; i++) {
            sbb.append(a);
        }
        list.add(sbb.toString());

        list.sort(Comparator.naturalOrder());

        System.out.println(list.get(0));
    }
} Main
import java.util.*;

public class Main {
    public static void main(String... args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();

        List<String> list = new ArrayList<>();

        StringBuilder sba = new StringBuilder();
        for (int i=0; i < a; i++) {
            sba.append(b);
        }
        list.add(sba.toString());

        StringBuilder sbb = new StringBuilder();
        for (int i=0; i < b; i++) {
            sbb.append(a);
        }
        list.add(sbb.toString());

        list.sort(Comparator.naturalOrder());

        System.out.println(list.get(0));
    }
}
