import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		MyInt mi = new MyInt();

		String longA = mi.makeString(a, b);
		String longB = mi.makeString(b, a);

		if (longA.compareTo(longB) > 0) System.out.println(longB);
		else System.out.println(longA);

		scan.close();
	}
}

class MyInt {
	String makeString(int a, int b) {
		String ans = new String();
		for (int i = 0; i < b; i++)
			ans += a;
		return ans;
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		MyInt mi = new MyInt();

		String longA = mi.makeString(a, b);
		String longB = mi.makeString(b, a);

		if (longA.compareTo(longB) > 0) System.out.println(longB);
		else System.out.println(longA);

		scan.close();
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		MyInt mi = new MyInt();

		String longA = mi.makeString(a, b);
		String longB = mi.makeString(b, a);

		if (longA.compareTo(longB) > 0) System.out.println(longB);
		else System.out.println(longA);

		scan.close();
	} main {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		MyInt mi = new MyInt();

		String longA = mi.makeString(a, b);
		String longB = mi.makeString(b, a);

		if (longA.compareTo(longB) > 0) System.out.println(longB);
		else System.out.println(longA);

		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan MyInt mi = new MyInt(); mi new MyInt() String longA = mi.makeString(a, b); longA mi.makeString(a, b) mi.makeString mi a b String longB = mi.makeString(b, a); longB mi.makeString(b, a) mi.makeString mi b a if (longA.compareTo(longB) > 0) System.out.println(longB);
		else System.out.println(longA); longA.compareTo(longB) > 0 longA.compareTo(longB) longA.compareTo longA longB 0 System.out.println(longB) System.out.println System.out System System.out longB System.out.println(longA) System.out.println System.out System System.out longA scan.close() scan.close scan String[] args args class MyInt {
	String makeString(int a, int b) {
		String ans = new String();
		for (int i = 0; i < b; i++)
			ans += a;
		return ans;
	}
} MyInt String makeString(int a, int b) {
		String ans = new String();
		for (int i = 0; i < b; i++)
			ans += a;
		return ans;
	} makeString {
		String ans = new String();
		for (int i = 0; i < b; i++)
			ans += a;
		return ans;
	} String ans = new String(); ans new String() for (int i = 0; i < b; i++)
			ans += a; int i = 0; int i = 0; i 0 i < b i b i++ i++ i ans += a; ans += a ans a return ans; ans int a a int b b public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		MyInt mi = new MyInt();

		String longA = mi.makeString(a, b);
		String longB = mi.makeString(b, a);

		if (longA.compareTo(longB) > 0) System.out.println(longB);
		else System.out.println(longA);

		scan.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		MyInt mi = new MyInt();

		String longA = mi.makeString(a, b);
		String longB = mi.makeString(b, a);

		if (longA.compareTo(longB) > 0) System.out.println(longB);
		else System.out.println(longA);

		scan.close();
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		MyInt mi = new MyInt();

		String longA = mi.makeString(a, b);
		String longB = mi.makeString(b, a);

		if (longA.compareTo(longB) > 0) System.out.println(longB);
		else System.out.println(longA);

		scan.close();
	}
}

class MyInt {
	String makeString(int a, int b) {
		String ans = new String();
		for (int i = 0; i < b; i++)
			ans += a;
		return ans;
	}
}