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);
    }
}

/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz