import java.util.ArrayList;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
	    ArrayList<Integer> input = getInput();

	    String a = "";
	    String b = "";
	    for (int i = 0; i < input.get(0); i++) a += input.get(1);
        for (int i = 0; i < input.get(1); i++) b += input.get(0);

        if (a.compareTo(b) < 0) {
            Print(a);
        } else {
            Print(b);
        }
    }

    private static Scanner scanner = new Scanner(System.in);
    private static ArrayList<Integer> getInput() {
        String in = scanner.nextLine();

        ArrayList<Integer> result = new ArrayList<>();
        for (String t : in.split(" ")) {
            result.add(Integer.parseInt(t));
        }

        return result;
    }

    private static void Print(Object o) {
        System.out.println(o);
    }
} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
	    ArrayList<Integer> input = getInput();

	    String a = "";
	    String b = "";
	    for (int i = 0; i < input.get(0); i++) a += input.get(1);
        for (int i = 0; i < input.get(1); i++) b += input.get(0);

        if (a.compareTo(b) < 0) {
            Print(a);
        } else {
            Print(b);
        }
    }

    private static Scanner scanner = new Scanner(System.in);
    private static ArrayList<Integer> getInput() {
        String in = scanner.nextLine();

        ArrayList<Integer> result = new ArrayList<>();
        for (String t : in.split(" ")) {
            result.add(Integer.parseInt(t));
        }

        return result;
    }

    private static void Print(Object o) {
        System.out.println(o);
    }
} Main private static Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) public static void main(String[] args) {
	    ArrayList<Integer> input = getInput();

	    String a = "";
	    String b = "";
	    for (int i = 0; i < input.get(0); i++) a += input.get(1);
        for (int i = 0; i < input.get(1); i++) b += input.get(0);

        if (a.compareTo(b) < 0) {
            Print(a);
        } else {
            Print(b);
        }
    } main {
	    ArrayList<Integer> input = getInput();

	    String a = "";
	    String b = "";
	    for (int i = 0; i < input.get(0); i++) a += input.get(1);
        for (int i = 0; i < input.get(1); i++) b += input.get(0);

        if (a.compareTo(b) < 0) {
            Print(a);
        } else {
            Print(b);
        }
    } ArrayList<Integer> input = getInput(); input getInput() getInput String a = ""; a "" String b = ""; b "" for (int i = 0; i < input.get(0); i++) a += input.get(1); int i = 0; int i = 0; i 0 i < input.get(0) i input.get(0) input.get input 0 i++ i++ i a += input.get(1); a += input.get(1) a input.get(1) input.get input 1 for (int i = 0; i < input.get(1); i++) b += input.get(0); int i = 0; int i = 0; i 0 i < input.get(1) i input.get(1) input.get input 1 i++ i++ i b += input.get(0); b += input.get(0) b input.get(0) input.get input 0 if (a.compareTo(b) < 0) {
            Print(a);
        } else {
            Print(b);
        } a.compareTo(b) < 0 a.compareTo(b) a.compareTo a b 0 {
            Print(a);
        } Print(a) Print a {
            Print(b);
        } Print(b) Print b String[] args args private static ArrayList<Integer> getInput() {
        String in = scanner.nextLine();

        ArrayList<Integer> result = new ArrayList<>();
        for (String t : in.split(" ")) {
            result.add(Integer.parseInt(t));
        }

        return result;
    } getInput {
        String in = scanner.nextLine();

        ArrayList<Integer> result = new ArrayList<>();
        for (String t : in.split(" ")) {
            result.add(Integer.parseInt(t));
        }

        return result;
    } String in = scanner.nextLine(); in scanner.nextLine() scanner.nextLine scanner ArrayList<Integer> result = new ArrayList<>(); result new ArrayList<>() for (String t : in.split(" ")) {
            result.add(Integer.parseInt(t));
        } String t in.split(" ") in.split in " " {
            result.add(Integer.parseInt(t));
        } {
            result.add(Integer.parseInt(t));
        } result.add(Integer.parseInt(t)) result.add result Integer.parseInt(t) Integer.parseInt Integer t return result; result private static void Print(Object o) {
        System.out.println(o);
    } Print {
        System.out.println(o);
    } System.out.println(o) System.out.println System.out System System.out o Object o o public class Main {
    public static void main(String[] args) {
	    ArrayList<Integer> input = getInput();

	    String a = "";
	    String b = "";
	    for (int i = 0; i < input.get(0); i++) a += input.get(1);
        for (int i = 0; i < input.get(1); i++) b += input.get(0);

        if (a.compareTo(b) < 0) {
            Print(a);
        } else {
            Print(b);
        }
    }

    private static Scanner scanner = new Scanner(System.in);
    private static ArrayList<Integer> getInput() {
        String in = scanner.nextLine();

        ArrayList<Integer> result = new ArrayList<>();
        for (String t : in.split(" ")) {
            result.add(Integer.parseInt(t));
        }

        return result;
    }

    private static void Print(Object o) {
        System.out.println(o);
    }
} public class Main {
    public static void main(String[] args) {
	    ArrayList<Integer> input = getInput();

	    String a = "";
	    String b = "";
	    for (int i = 0; i < input.get(0); i++) a += input.get(1);
        for (int i = 0; i < input.get(1); i++) b += input.get(0);

        if (a.compareTo(b) < 0) {
            Print(a);
        } else {
            Print(b);
        }
    }

    private static Scanner scanner = new Scanner(System.in);
    private static ArrayList<Integer> getInput() {
        String in = scanner.nextLine();

        ArrayList<Integer> result = new ArrayList<>();
        for (String t : in.split(" ")) {
            result.add(Integer.parseInt(t));
        }

        return result;
    }

    private static void Print(Object o) {
        System.out.println(o);
    }
} Main
import java.util.ArrayList;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
	    ArrayList<Integer> input = getInput();

	    String a = "";
	    String b = "";
	    for (int i = 0; i < input.get(0); i++) a += input.get(1);
        for (int i = 0; i < input.get(1); i++) b += input.get(0);

        if (a.compareTo(b) < 0) {
            Print(a);
        } else {
            Print(b);
        }
    }

    private static Scanner scanner = new Scanner(System.in);
    private static ArrayList<Integer> getInput() {
        String in = scanner.nextLine();

        ArrayList<Integer> result = new ArrayList<>();
        for (String t : in.split(" ")) {
            result.add(Integer.parseInt(t));
        }

        return result;
    }

    private static void Print(Object o) {
        System.out.println(o);
    }
}
