//--- pB ---//
import java.util.*;
import java.lang.*;
import java.io.*;

public class Main {
	public static void main (String[] args) throws java.lang.Exception {
		new Solution();
	}
}
class Solution {
	Scanner scanner;
	public Solution() {
		scanner = new Scanner(System.in);

		// scanner.nextLine();
		while (scanner.hasNext()) {
			run_case();
		}
	}
	private void run_case() {
		// scanner.nextLine();
		String line = scanner.nextLine();

		// int A = Integer.parseInt(line.split("\\s+")[0]);
		// int B = Integer.parseInt(line.split("\\s+")[1]);

		String a = line.split("\\s+")[0];
		String b = line.split("\\s+")[1];

		StringBuilder str_a = new StringBuilder();
		for (int i=0; i<Integer.parseInt(b); i++) {
			str_a.append(a);
		}

		StringBuilder str_b = new StringBuilder();
		for (int i=0; i<Integer.parseInt(a); i++) {
			str_b.append(b);
		}

		int res = str_a.toString().compareTo(str_b.toString());
		if (res < 0) {
			System.out.println(str_a);
		} else {
			System.out.println(str_b);
		}
	}

	private int[] strToIntArray(String str) {
	    String[] vals = str.split("\\s+");
	    int sz = vals.length;
	    int[] res = new int[sz];
	    for (int i=0; i<sz; i++) {
	        res[i] = Integer.parseInt(vals[i]);
	    }
	    return res;
	}

} import java.util.*; util.* java import java.lang.*; lang.* java import java.io.*; io.* java public class Main {
	public static void main (String[] args) throws java.lang.Exception {
		new Solution();
	}
} Main public static void main (String[] args) throws java.lang.Exception {
		new Solution();
	} main {
		new Solution();
	} new Solution() String[] args args class Solution {
	Scanner scanner;
	public Solution() {
		scanner = new Scanner(System.in);

		// scanner.nextLine();
		while (scanner.hasNext()) {
			run_case();
		}
	}
	private void run_case() {
		// scanner.nextLine();
		String line = scanner.nextLine();

		// int A = Integer.parseInt(line.split("\\s+")[0]);
		// int B = Integer.parseInt(line.split("\\s+")[1]);

		String a = line.split("\\s+")[0];
		String b = line.split("\\s+")[1];

		StringBuilder str_a = new StringBuilder();
		for (int i=0; i<Integer.parseInt(b); i++) {
			str_a.append(a);
		}

		StringBuilder str_b = new StringBuilder();
		for (int i=0; i<Integer.parseInt(a); i++) {
			str_b.append(b);
		}

		int res = str_a.toString().compareTo(str_b.toString());
		if (res < 0) {
			System.out.println(str_a);
		} else {
			System.out.println(str_b);
		}
	}

	private int[] strToIntArray(String str) {
	    String[] vals = str.split("\\s+");
	    int sz = vals.length;
	    int[] res = new int[sz];
	    for (int i=0; i<sz; i++) {
	        res[i] = Integer.parseInt(vals[i]);
	    }
	    return res;
	}

} Solution Scanner scanner; scanner public Solution() {
		scanner = new Scanner(System.in);

		// scanner.nextLine();
		while (scanner.hasNext()) {
			run_case();
		}
	} Solution {
		scanner = new Scanner(System.in);

		// scanner.nextLine();
		while (scanner.hasNext()) {
			run_case();
		}
	} scanner = new Scanner(System.in) scanner new Scanner(System.in) while (scanner.hasNext()) {
			run_case();
		} scanner.hasNext() scanner.hasNext scanner {
			run_case();
		} run_case() run_case private void run_case() {
		// scanner.nextLine();
		String line = scanner.nextLine();

		// int A = Integer.parseInt(line.split("\\s+")[0]);
		// int B = Integer.parseInt(line.split("\\s+")[1]);

		String a = line.split("\\s+")[0];
		String b = line.split("\\s+")[1];

		StringBuilder str_a = new StringBuilder();
		for (int i=0; i<Integer.parseInt(b); i++) {
			str_a.append(a);
		}

		StringBuilder str_b = new StringBuilder();
		for (int i=0; i<Integer.parseInt(a); i++) {
			str_b.append(b);
		}

		int res = str_a.toString().compareTo(str_b.toString());
		if (res < 0) {
			System.out.println(str_a);
		} else {
			System.out.println(str_b);
		}
	} run_case {
		// scanner.nextLine();
		String line = scanner.nextLine();

		// int A = Integer.parseInt(line.split("\\s+")[0]);
		// int B = Integer.parseInt(line.split("\\s+")[1]);

		String a = line.split("\\s+")[0];
		String b = line.split("\\s+")[1];

		StringBuilder str_a = new StringBuilder();
		for (int i=0; i<Integer.parseInt(b); i++) {
			str_a.append(a);
		}

		StringBuilder str_b = new StringBuilder();
		for (int i=0; i<Integer.parseInt(a); i++) {
			str_b.append(b);
		}

		int res = str_a.toString().compareTo(str_b.toString());
		if (res < 0) {
			System.out.println(str_a);
		} else {
			System.out.println(str_b);
		}
	} String line = scanner.nextLine(); line scanner.nextLine() scanner.nextLine scanner String a = line.split("\\s+")[0]; a line.split("\\s+")[0] line.split("\\s+") line.split line "\\s+" 0 String b = line.split("\\s+")[1]; b line.split("\\s+")[1] line.split("\\s+") line.split line "\\s+" 1 StringBuilder str_a = new StringBuilder(); str_a new StringBuilder() for (int i=0; i<Integer.parseInt(b); i++) {
			str_a.append(a);
		} int i=0; int i=0; i 0 i<Integer.parseInt(b) i Integer.parseInt(b) Integer.parseInt Integer b i++ i++ i {
			str_a.append(a);
		} {
			str_a.append(a);
		} str_a.append(a) str_a.append str_a a StringBuilder str_b = new StringBuilder(); str_b new StringBuilder() for (int i=0; i<Integer.parseInt(a); i++) {
			str_b.append(b);
		} int i=0; int i=0; i 0 i<Integer.parseInt(a) i Integer.parseInt(a) Integer.parseInt Integer a i++ i++ i {
			str_b.append(b);
		} {
			str_b.append(b);
		} str_b.append(b) str_b.append str_b b int res = str_a.toString().compareTo(str_b.toString()); res str_a.toString().compareTo(str_b.toString()) str_a.toString().compareTo str_a.toString() str_a.toString str_a str_b.toString() str_b.toString str_b if (res < 0) {
			System.out.println(str_a);
		} else {
			System.out.println(str_b);
		} res < 0 res 0 {
			System.out.println(str_a);
		} System.out.println(str_a) System.out.println System.out System System.out str_a {
			System.out.println(str_b);
		} System.out.println(str_b) System.out.println System.out System System.out str_b private int[] strToIntArray(String str) {
	    String[] vals = str.split("\\s+");
	    int sz = vals.length;
	    int[] res = new int[sz];
	    for (int i=0; i<sz; i++) {
	        res[i] = Integer.parseInt(vals[i]);
	    }
	    return res;
	} strToIntArray {
	    String[] vals = str.split("\\s+");
	    int sz = vals.length;
	    int[] res = new int[sz];
	    for (int i=0; i<sz; i++) {
	        res[i] = Integer.parseInt(vals[i]);
	    }
	    return res;
	} String[] vals = str.split("\\s+"); vals str.split("\\s+") str.split str "\\s+" int sz = vals.length; sz vals.length vals vals.length int[] res = new int[sz]; res new int[sz] sz for (int i=0; i<sz; i++) {
	        res[i] = Integer.parseInt(vals[i]);
	    } int i=0; int i=0; i 0 i<sz i sz i++ i++ i {
	        res[i] = Integer.parseInt(vals[i]);
	    } {
	        res[i] = Integer.parseInt(vals[i]);
	    } res[i] = Integer.parseInt(vals[i]) res[i] res i Integer.parseInt(vals[i]) Integer.parseInt Integer vals[i] vals i return res; res String str str public class Main {
	public static void main (String[] args) throws java.lang.Exception {
		new Solution();
	}
} public class Main {
	public static void main (String[] args) throws java.lang.Exception {
		new Solution();
	}
} Main
//--- pB ---//
import java.util.*;
import java.lang.*;
import java.io.*;

public class Main {
	public static void main (String[] args) throws java.lang.Exception {
		new Solution();
	}
}
class Solution {
	Scanner scanner;
	public Solution() {
		scanner = new Scanner(System.in);

		// scanner.nextLine();
		while (scanner.hasNext()) {
			run_case();
		}
	}
	private void run_case() {
		// scanner.nextLine();
		String line = scanner.nextLine();

		// int A = Integer.parseInt(line.split("\\s+")[0]);
		// int B = Integer.parseInt(line.split("\\s+")[1]);

		String a = line.split("\\s+")[0];
		String b = line.split("\\s+")[1];

		StringBuilder str_a = new StringBuilder();
		for (int i=0; i<Integer.parseInt(b); i++) {
			str_a.append(a);
		}

		StringBuilder str_b = new StringBuilder();
		for (int i=0; i<Integer.parseInt(a); i++) {
			str_b.append(b);
		}

		int res = str_a.toString().compareTo(str_b.toString());
		if (res < 0) {
			System.out.println(str_a);
		} else {
			System.out.println(str_b);
		}
	}

	private int[] strToIntArray(String str) {
	    String[] vals = str.split("\\s+");
	    int sz = vals.length;
	    int[] res = new int[sz];
	    for (int i=0; i<sz; i++) {
	        res[i] = Integer.parseInt(vals[i]);
	    }
	    return res;
	}

}
