import java.util.Scanner;

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

		String aw = "";
		for (int i = 0; i < b; i++) {
			aw += String.valueOf(a);
		}
		String bw = "";
		for (int i = 0; i < a; i++) {
			bw += String.valueOf(b);
		}
		if (aw.compareTo(bw) >= 0) {
			System.out.println(bw);
		} else {
			System.out.println(aw);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		sc.close();

		String aw = "";
		for (int i = 0; i < b; i++) {
			aw += String.valueOf(a);
		}
		String bw = "";
		for (int i = 0; i < a; i++) {
			bw += String.valueOf(b);
		}
		if (aw.compareTo(bw) >= 0) {
			System.out.println(bw);
		} else {
			System.out.println(aw);
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		sc.close();

		String aw = "";
		for (int i = 0; i < b; i++) {
			aw += String.valueOf(a);
		}
		String bw = "";
		for (int i = 0; i < a; i++) {
			bw += String.valueOf(b);
		}
		if (aw.compareTo(bw) >= 0) {
			System.out.println(bw);
		} else {
			System.out.println(aw);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		sc.close();

		String aw = "";
		for (int i = 0; i < b; i++) {
			aw += String.valueOf(a);
		}
		String bw = "";
		for (int i = 0; i < a; i++) {
			bw += String.valueOf(b);
		}
		if (aw.compareTo(bw) >= 0) {
			System.out.println(bw);
		} else {
			System.out.println(aw);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc sc.close() sc.close sc String aw = ""; aw "" for (int i = 0; i < b; i++) {
			aw += String.valueOf(a);
		} int i = 0; int i = 0; i 0 i < b i b i++ i++ i {
			aw += String.valueOf(a);
		} {
			aw += String.valueOf(a);
		} aw += String.valueOf(a) aw String.valueOf(a) String.valueOf String a String bw = ""; bw "" for (int i = 0; i < a; i++) {
			bw += String.valueOf(b);
		} int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
			bw += String.valueOf(b);
		} {
			bw += String.valueOf(b);
		} bw += String.valueOf(b) bw String.valueOf(b) String.valueOf String b if (aw.compareTo(bw) >= 0) {
			System.out.println(bw);
		} else {
			System.out.println(aw);
		} aw.compareTo(bw) >= 0 aw.compareTo(bw) aw.compareTo aw bw 0 {
			System.out.println(bw);
		} System.out.println(bw) System.out.println System.out System System.out bw {
			System.out.println(aw);
		} System.out.println(aw) System.out.println System.out System System.out aw String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		sc.close();

		String aw = "";
		for (int i = 0; i < b; i++) {
			aw += String.valueOf(a);
		}
		String bw = "";
		for (int i = 0; i < a; i++) {
			bw += String.valueOf(b);
		}
		if (aw.compareTo(bw) >= 0) {
			System.out.println(bw);
		} else {
			System.out.println(aw);
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		sc.close();

		String aw = "";
		for (int i = 0; i < b; i++) {
			aw += String.valueOf(a);
		}
		String bw = "";
		for (int i = 0; i < a; i++) {
			bw += String.valueOf(b);
		}
		if (aw.compareTo(bw) >= 0) {
			System.out.println(bw);
		} else {
			System.out.println(aw);
		}
	}
} Main
import java.util.Scanner;

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

		String aw = "";
		for (int i = 0; i < b; i++) {
			aw += String.valueOf(a);
		}
		String bw = "";
		for (int i = 0; i < a; i++) {
			bw += String.valueOf(b);
		}
		if (aw.compareTo(bw) >= 0) {
			System.out.println(bw);
		} else {
			System.out.println(aw);
		}
	}
}
