import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	static int[] S ;
	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		String[] Ws = W.split(" ");

		long a = Long.parseLong(Ws[0]);
		long b = Long.parseLong(Ws[1]);

		String A = "";
		String B = "";
		for(int i=0;i<b;i++){
			A+=String.valueOf(a);
		}

		for(int i=0;i<a;i++){
			B+=String.valueOf(b);
		}

		System.out.println(A.compareTo(B)<=0?A:B);
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	static int[] S ;
	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		String[] Ws = W.split(" ");

		long a = Long.parseLong(Ws[0]);
		long b = Long.parseLong(Ws[1]);

		String A = "";
		String B = "";
		for(int i=0;i<b;i++){
			A+=String.valueOf(a);
		}

		for(int i=0;i<a;i++){
			B+=String.valueOf(b);
		}

		System.out.println(A.compareTo(B)<=0?A:B);
	}
} Main static int[] S ; S public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		String[] Ws = W.split(" ");

		long a = Long.parseLong(Ws[0]);
		long b = Long.parseLong(Ws[1]);

		String A = "";
		String B = "";
		for(int i=0;i<b;i++){
			A+=String.valueOf(a);
		}

		for(int i=0;i<a;i++){
			B+=String.valueOf(b);
		}

		System.out.println(A.compareTo(B)<=0?A:B);
	} main {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		String[] Ws = W.split(" ");

		long a = Long.parseLong(Ws[0]);
		long b = Long.parseLong(Ws[1]);

		String A = "";
		String B = "";
		for(int i=0;i<b;i++){
			A+=String.valueOf(a);
		}

		for(int i=0;i<a;i++){
			B+=String.valueOf(b);
		}

		System.out.println(A.compareTo(B)<=0?A:B);
	} BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String W = in.readLine(); W in.readLine() in.readLine in String[] Ws = W.split(" "); Ws W.split(" ") W.split W " " long a = Long.parseLong(Ws[0]); a Long.parseLong(Ws[0]) Long.parseLong Long Ws[0] Ws 0 long b = Long.parseLong(Ws[1]); b Long.parseLong(Ws[1]) Long.parseLong Long Ws[1] Ws 1 String A = ""; A "" String B = ""; B "" for(int i=0;i<b;i++){
			A+=String.valueOf(a);
		} int i=0; int i=0; i 0 i<b i b i++ i++ i {
			A+=String.valueOf(a);
		} {
			A+=String.valueOf(a);
		} A+=String.valueOf(a) A String.valueOf(a) String.valueOf String a for(int i=0;i<a;i++){
			B+=String.valueOf(b);
		} int i=0; int i=0; i 0 i<a i a i++ i++ i {
			B+=String.valueOf(b);
		} {
			B+=String.valueOf(b);
		} B+=String.valueOf(b) B String.valueOf(b) String.valueOf String b System.out.println(A.compareTo(B)<=0?A:B) System.out.println System.out System System.out A.compareTo(B)<=0?A:B A.compareTo(B)<=0 A.compareTo(B) A.compareTo A B 0 A B String[] args args public class Main {

	static int[] S ;
	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		String[] Ws = W.split(" ");

		long a = Long.parseLong(Ws[0]);
		long b = Long.parseLong(Ws[1]);

		String A = "";
		String B = "";
		for(int i=0;i<b;i++){
			A+=String.valueOf(a);
		}

		for(int i=0;i<a;i++){
			B+=String.valueOf(b);
		}

		System.out.println(A.compareTo(B)<=0?A:B);
	}
} public class Main {

	static int[] S ;
	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		String[] Ws = W.split(" ");

		long a = Long.parseLong(Ws[0]);
		long b = Long.parseLong(Ws[1]);

		String A = "";
		String B = "";
		for(int i=0;i<b;i++){
			A+=String.valueOf(a);
		}

		for(int i=0;i<a;i++){
			B+=String.valueOf(b);
		}

		System.out.println(A.compareTo(B)<=0?A:B);
	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	static int[] S ;
	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		String[] Ws = W.split(" ");

		long a = Long.parseLong(Ws[0]);
		long b = Long.parseLong(Ws[1]);

		String A = "";
		String B = "";
		for(int i=0;i<b;i++){
			A+=String.valueOf(a);
		}

		for(int i=0;i<a;i++){
			B+=String.valueOf(b);
		}

		System.out.println(A.compareTo(B)<=0?A:B);
	}
}
