import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int a = stdIn.nextInt();
		int b = stdIn.nextInt();
		int c = 0;
		int d = 0;
		int aa = a;
		while(aa>0) {
			aa--;
			c += b*Math.pow(10,aa);
			
		}
		while(b>0) {
			b--;
			d += a*Math.pow(10,b);
		}
		System.out.println(Math.max(c, d));
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int a = stdIn.nextInt();
		int b = stdIn.nextInt();
		int c = 0;
		int d = 0;
		int aa = a;
		while(aa>0) {
			aa--;
			c += b*Math.pow(10,aa);
			
		}
		while(b>0) {
			b--;
			d += a*Math.pow(10,b);
		}
		System.out.println(Math.max(c, d));
	}
} Main public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int a = stdIn.nextInt();
		int b = stdIn.nextInt();
		int c = 0;
		int d = 0;
		int aa = a;
		while(aa>0) {
			aa--;
			c += b*Math.pow(10,aa);
			
		}
		while(b>0) {
			b--;
			d += a*Math.pow(10,b);
		}
		System.out.println(Math.max(c, d));
	} main {
		Scanner stdIn = new Scanner(System.in);
		int a = stdIn.nextInt();
		int b = stdIn.nextInt();
		int c = 0;
		int d = 0;
		int aa = a;
		while(aa>0) {
			aa--;
			c += b*Math.pow(10,aa);
			
		}
		while(b>0) {
			b--;
			d += a*Math.pow(10,b);
		}
		System.out.println(Math.max(c, d));
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int a = stdIn.nextInt(); a stdIn.nextInt() stdIn.nextInt stdIn int b = stdIn.nextInt(); b stdIn.nextInt() stdIn.nextInt stdIn int c = 0; c 0 int d = 0; d 0 int aa = a; aa a while(aa>0) {
			aa--;
			c += b*Math.pow(10,aa);
			
		} aa>0 aa 0 {
			aa--;
			c += b*Math.pow(10,aa);
			
		} aa-- aa c += b*Math.pow(10,aa) c b*Math.pow(10,aa) b Math.pow(10,aa) Math.pow Math 10 aa while(b>0) {
			b--;
			d += a*Math.pow(10,b);
		} b>0 b 0 {
			b--;
			d += a*Math.pow(10,b);
		} b-- b d += a*Math.pow(10,b) d a*Math.pow(10,b) a Math.pow(10,b) Math.pow Math 10 b System.out.println(Math.max(c, d)) System.out.println System.out System System.out Math.max(c, d) Math.max Math c d String[] args args public class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int a = stdIn.nextInt();
		int b = stdIn.nextInt();
		int c = 0;
		int d = 0;
		int aa = a;
		while(aa>0) {
			aa--;
			c += b*Math.pow(10,aa);
			
		}
		while(b>0) {
			b--;
			d += a*Math.pow(10,b);
		}
		System.out.println(Math.max(c, d));
	}
} public class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int a = stdIn.nextInt();
		int b = stdIn.nextInt();
		int c = 0;
		int d = 0;
		int aa = a;
		while(aa>0) {
			aa--;
			c += b*Math.pow(10,aa);
			
		}
		while(b>0) {
			b--;
			d += a*Math.pow(10,b);
		}
		System.out.println(Math.max(c, d));
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int a = stdIn.nextInt();
		int b = stdIn.nextInt();
		int c = 0;
		int d = 0;
		int aa = a;
		while(aa>0) {
			aa--;
			c += b*Math.pow(10,aa);
			
		}
		while(b>0) {
			b--;
			d += a*Math.pow(10,b);
		}
		System.out.println(Math.max(c, d));
	}
}
