import java.util.Scanner;
public class Main {
	public static void main(String[]args) {
		Scanner s = new Scanner(System.in);
		int a1 = s.nextInt();
		int b1 = s.nextInt();
		String a = Integer.toString(a1);
		String b = Integer.toString(b1);
		
			for(int i = 0; i<b1-1;i++) {
				a += a.charAt(0);
			}
			
			for(int i = 0; i<a1-1;i++) {
				b += b.charAt(0);
			}
		
		if(a.compareTo(b)<=0) {
			System.out.println(a);
		}else System.out.println(b);
		
		
		
		
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[]args) {
		Scanner s = new Scanner(System.in);
		int a1 = s.nextInt();
		int b1 = s.nextInt();
		String a = Integer.toString(a1);
		String b = Integer.toString(b1);
		
			for(int i = 0; i<b1-1;i++) {
				a += a.charAt(0);
			}
			
			for(int i = 0; i<a1-1;i++) {
				b += b.charAt(0);
			}
		
		if(a.compareTo(b)<=0) {
			System.out.println(a);
		}else System.out.println(b);
		
		
		
		
	}
} Main public static void main(String[]args) {
		Scanner s = new Scanner(System.in);
		int a1 = s.nextInt();
		int b1 = s.nextInt();
		String a = Integer.toString(a1);
		String b = Integer.toString(b1);
		
			for(int i = 0; i<b1-1;i++) {
				a += a.charAt(0);
			}
			
			for(int i = 0; i<a1-1;i++) {
				b += b.charAt(0);
			}
		
		if(a.compareTo(b)<=0) {
			System.out.println(a);
		}else System.out.println(b);
		
		
		
		
	} main {
		Scanner s = new Scanner(System.in);
		int a1 = s.nextInt();
		int b1 = s.nextInt();
		String a = Integer.toString(a1);
		String b = Integer.toString(b1);
		
			for(int i = 0; i<b1-1;i++) {
				a += a.charAt(0);
			}
			
			for(int i = 0; i<a1-1;i++) {
				b += b.charAt(0);
			}
		
		if(a.compareTo(b)<=0) {
			System.out.println(a);
		}else System.out.println(b);
		
		
		
		
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) int a1 = s.nextInt(); a1 s.nextInt() s.nextInt s int b1 = s.nextInt(); b1 s.nextInt() s.nextInt s String a = Integer.toString(a1); a Integer.toString(a1) Integer.toString Integer a1 String b = Integer.toString(b1); b Integer.toString(b1) Integer.toString Integer b1 for(int i = 0; i<b1-1;i++) {
				a += a.charAt(0);
			} int i = 0; int i = 0; i 0 i<b1-1 i b1-1 b1 1 i++ i++ i {
				a += a.charAt(0);
			} {
				a += a.charAt(0);
			} a += a.charAt(0) a a.charAt(0) a.charAt a 0 for(int i = 0; i<a1-1;i++) {
				b += b.charAt(0);
			} int i = 0; int i = 0; i 0 i<a1-1 i a1-1 a1 1 i++ i++ i {
				b += b.charAt(0);
			} {
				b += b.charAt(0);
			} b += b.charAt(0) b b.charAt(0) b.charAt b 0 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 System.out System System.out b String[]args args public class Main {
	public static void main(String[]args) {
		Scanner s = new Scanner(System.in);
		int a1 = s.nextInt();
		int b1 = s.nextInt();
		String a = Integer.toString(a1);
		String b = Integer.toString(b1);
		
			for(int i = 0; i<b1-1;i++) {
				a += a.charAt(0);
			}
			
			for(int i = 0; i<a1-1;i++) {
				b += b.charAt(0);
			}
		
		if(a.compareTo(b)<=0) {
			System.out.println(a);
		}else System.out.println(b);
		
		
		
		
	}
} public class Main {
	public static void main(String[]args) {
		Scanner s = new Scanner(System.in);
		int a1 = s.nextInt();
		int b1 = s.nextInt();
		String a = Integer.toString(a1);
		String b = Integer.toString(b1);
		
			for(int i = 0; i<b1-1;i++) {
				a += a.charAt(0);
			}
			
			for(int i = 0; i<a1-1;i++) {
				b += b.charAt(0);
			}
		
		if(a.compareTo(b)<=0) {
			System.out.println(a);
		}else System.out.println(b);
		
		
		
		
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[]args) {
		Scanner s = new Scanner(System.in);
		int a1 = s.nextInt();
		int b1 = s.nextInt();
		String a = Integer.toString(a1);
		String b = Integer.toString(b1);
		
			for(int i = 0; i<b1-1;i++) {
				a += a.charAt(0);
			}
			
			for(int i = 0; i<a1-1;i++) {
				b += b.charAt(0);
			}
		
		if(a.compareTo(b)<=0) {
			System.out.println(a);
		}else System.out.println(b);
		
		
		
		
	}
}
