import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
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();
		List<String> list = new ArrayList();
		StringBuilder sb = new StringBuilder();
		for(int i = 0;i < a;i++){
			sb.append(b);
		}
		list.add(sb.toString());
		sb.delete(0, sb.length());
		for(int i = 0;i < b;i++){
			sb.append(a);
		}
		list.add(sb.toString());
		list.sort(Comparator.naturalOrder());
		System.out.println(list.get(0));
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Comparator; Comparator java.util import java.util.List; List java.util 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();
		List<String> list = new ArrayList();
		StringBuilder sb = new StringBuilder();
		for(int i = 0;i < a;i++){
			sb.append(b);
		}
		list.add(sb.toString());
		sb.delete(0, sb.length());
		for(int i = 0;i < b;i++){
			sb.append(a);
		}
		list.add(sb.toString());
		list.sort(Comparator.naturalOrder());
		System.out.println(list.get(0));
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		sc.close();
		List<String> list = new ArrayList();
		StringBuilder sb = new StringBuilder();
		for(int i = 0;i < a;i++){
			sb.append(b);
		}
		list.add(sb.toString());
		sb.delete(0, sb.length());
		for(int i = 0;i < b;i++){
			sb.append(a);
		}
		list.add(sb.toString());
		list.sort(Comparator.naturalOrder());
		System.out.println(list.get(0));
	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		sc.close();
		List<String> list = new ArrayList();
		StringBuilder sb = new StringBuilder();
		for(int i = 0;i < a;i++){
			sb.append(b);
		}
		list.add(sb.toString());
		sb.delete(0, sb.length());
		for(int i = 0;i < b;i++){
			sb.append(a);
		}
		list.add(sb.toString());
		list.sort(Comparator.naturalOrder());
		System.out.println(list.get(0));
	} 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 List<String> list = new ArrayList(); list new ArrayList() StringBuilder sb = new StringBuilder(); sb new StringBuilder() for(int i = 0;i < a;i++){
			sb.append(b);
		} int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
			sb.append(b);
		} {
			sb.append(b);
		} sb.append(b) sb.append sb b list.add(sb.toString()) list.add list sb.toString() sb.toString sb sb.delete(0, sb.length()) sb.delete sb 0 sb.length() sb.length sb for(int i = 0;i < b;i++){
			sb.append(a);
		} int i = 0; int i = 0; i 0 i < b i b i++ i++ i {
			sb.append(a);
		} {
			sb.append(a);
		} sb.append(a) sb.append sb a list.add(sb.toString()) list.add list sb.toString() sb.toString sb list.sort(Comparator.naturalOrder()) list.sort list Comparator.naturalOrder() Comparator.naturalOrder Comparator System.out.println(list.get(0)) System.out.println System.out System System.out list.get(0) list.get list 0 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();
		List<String> list = new ArrayList();
		StringBuilder sb = new StringBuilder();
		for(int i = 0;i < a;i++){
			sb.append(b);
		}
		list.add(sb.toString());
		sb.delete(0, sb.length());
		for(int i = 0;i < b;i++){
			sb.append(a);
		}
		list.add(sb.toString());
		list.sort(Comparator.naturalOrder());
		System.out.println(list.get(0));
	}
} 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();
		List<String> list = new ArrayList();
		StringBuilder sb = new StringBuilder();
		for(int i = 0;i < a;i++){
			sb.append(b);
		}
		list.add(sb.toString());
		sb.delete(0, sb.length());
		for(int i = 0;i < b;i++){
			sb.append(a);
		}
		list.add(sb.toString());
		list.sort(Comparator.naturalOrder());
		System.out.println(list.get(0));
	}
} Main
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
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();
		List<String> list = new ArrayList();
		StringBuilder sb = new StringBuilder();
		for(int i = 0;i < a;i++){
			sb.append(b);
		}
		list.add(sb.toString());
		sb.delete(0, sb.length());
		for(int i = 0;i < b;i++){
			sb.append(a);
		}
		list.add(sb.toString());
		list.sort(Comparator.naturalOrder());
		System.out.println(list.get(0));
	}
}