import java.io.FileNotFoundException;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();

		String A = "";
		String B = "";

		for(int i=0;i<a;i++) {
			B += Integer.toString(b);
		}
		for(int i=0;i<b;i++) {
			A += Integer.toString(a);
		}
		if(A.compareTo(B)<0) {
			System.out.println(A);
		} else {
			System.out.println(B);
		}
	}
} import java.io.FileNotFoundException; FileNotFoundException java.io import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();

		String A = "";
		String B = "";

		for(int i=0;i<a;i++) {
			B += Integer.toString(b);
		}
		for(int i=0;i<b;i++) {
			A += Integer.toString(a);
		}
		if(A.compareTo(B)<0) {
			System.out.println(A);
		} else {
			System.out.println(B);
		}
	}
} Main public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();

		String A = "";
		String B = "";

		for(int i=0;i<a;i++) {
			B += Integer.toString(b);
		}
		for(int i=0;i<b;i++) {
			A += Integer.toString(a);
		}
		if(A.compareTo(B)<0) {
			System.out.println(A);
		} else {
			System.out.println(B);
		}
	} main {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();

		String A = "";
		String B = "";

		for(int i=0;i<a;i++) {
			B += Integer.toString(b);
		}
		for(int i=0;i<b;i++) {
			A += Integer.toString(a);
		}
		if(A.compareTo(B)<0) {
			System.out.println(A);
		} else {
			System.out.println(B);
		}
	} 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 String A = ""; A "" String B = ""; B "" for(int i=0;i<a;i++) {
			B += Integer.toString(b);
		} int i=0; int i=0; i 0 i<a i a i++ i++ i {
			B += Integer.toString(b);
		} {
			B += Integer.toString(b);
		} B += Integer.toString(b) B Integer.toString(b) Integer.toString Integer b for(int i=0;i<b;i++) {
			A += Integer.toString(a);
		} int i=0; int i=0; i 0 i<b i b i++ i++ i {
			A += Integer.toString(a);
		} {
			A += Integer.toString(a);
		} A += Integer.toString(a) A Integer.toString(a) Integer.toString Integer a if(A.compareTo(B)<0) {
			System.out.println(A);
		} else {
			System.out.println(B);
		} A.compareTo(B)<0 A.compareTo(B) A.compareTo A B 0 {
			System.out.println(A);
		} System.out.println(A) System.out.println System.out System System.out A {
			System.out.println(B);
		} System.out.println(B) System.out.println System.out System System.out B String[] args args public class Main {
	public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();

		String A = "";
		String B = "";

		for(int i=0;i<a;i++) {
			B += Integer.toString(b);
		}
		for(int i=0;i<b;i++) {
			A += Integer.toString(a);
		}
		if(A.compareTo(B)<0) {
			System.out.println(A);
		} else {
			System.out.println(B);
		}
	}
} public class Main {
	public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();

		String A = "";
		String B = "";

		for(int i=0;i<a;i++) {
			B += Integer.toString(b);
		}
		for(int i=0;i<b;i++) {
			A += Integer.toString(a);
		}
		if(A.compareTo(B)<0) {
			System.out.println(A);
		} else {
			System.out.println(B);
		}
	}
} Main
import java.io.FileNotFoundException;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();

		String A = "";
		String B = "";

		for(int i=0;i<a;i++) {
			B += Integer.toString(b);
		}
		for(int i=0;i<b;i++) {
			A += Integer.toString(a);
		}
		if(A.compareTo(B)<0) {
			System.out.println(A);
		} else {
			System.out.println(B);
		}
	}
}