import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

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

		Scanner sc = new Scanner(System.in);
		Integer a = Integer.parseInt(sc.next());
		Integer b = Integer.parseInt(sc.next());

		List<String> list = new ArrayList<>();
		StringBuilder sb =  new StringBuilder();
		for(int i=0;i<b; i++) {
			sb.append(a.toString());
		}
		list.add(sb.toString());
		StringBuilder sb2 =  new StringBuilder();
		for(int i=0;i<a; i++) {
			sb2.append(b.toString());
		}
		list.add(sb2.toString());
		Collections.sort(list);
		System.out.println(list.get(0));

	}
} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		Integer a = Integer.parseInt(sc.next());
		Integer b = Integer.parseInt(sc.next());

		List<String> list = new ArrayList<>();
		StringBuilder sb =  new StringBuilder();
		for(int i=0;i<b; i++) {
			sb.append(a.toString());
		}
		list.add(sb.toString());
		StringBuilder sb2 =  new StringBuilder();
		for(int i=0;i<a; i++) {
			sb2.append(b.toString());
		}
		list.add(sb2.toString());
		Collections.sort(list);
		System.out.println(list.get(0));

	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		Integer a = Integer.parseInt(sc.next());
		Integer b = Integer.parseInt(sc.next());

		List<String> list = new ArrayList<>();
		StringBuilder sb =  new StringBuilder();
		for(int i=0;i<b; i++) {
			sb.append(a.toString());
		}
		list.add(sb.toString());
		StringBuilder sb2 =  new StringBuilder();
		for(int i=0;i<a; i++) {
			sb2.append(b.toString());
		}
		list.add(sb2.toString());
		Collections.sort(list);
		System.out.println(list.get(0));

	} main {

		Scanner sc = new Scanner(System.in);
		Integer a = Integer.parseInt(sc.next());
		Integer b = Integer.parseInt(sc.next());

		List<String> list = new ArrayList<>();
		StringBuilder sb =  new StringBuilder();
		for(int i=0;i<b; i++) {
			sb.append(a.toString());
		}
		list.add(sb.toString());
		StringBuilder sb2 =  new StringBuilder();
		for(int i=0;i<a; i++) {
			sb2.append(b.toString());
		}
		list.add(sb2.toString());
		Collections.sort(list);
		System.out.println(list.get(0));

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) Integer a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc Integer b = Integer.parseInt(sc.next()); b Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc List<String> list = new ArrayList<>(); list new ArrayList<>() StringBuilder sb =  new StringBuilder(); sb new StringBuilder() for(int i=0;i<b; i++) {
			sb.append(a.toString());
		} int i=0; int i=0; i 0 i<b i b i++ i++ i {
			sb.append(a.toString());
		} {
			sb.append(a.toString());
		} sb.append(a.toString()) sb.append sb a.toString() a.toString a list.add(sb.toString()) list.add list sb.toString() sb.toString sb StringBuilder sb2 =  new StringBuilder(); sb2 new StringBuilder() for(int i=0;i<a; i++) {
			sb2.append(b.toString());
		} int i=0; int i=0; i 0 i<a i a i++ i++ i {
			sb2.append(b.toString());
		} {
			sb2.append(b.toString());
		} sb2.append(b.toString()) sb2.append sb2 b.toString() b.toString b list.add(sb2.toString()) list.add list sb2.toString() sb2.toString sb2 Collections.sort(list) Collections.sort Collections list System.out.println(list.get(0)) System.out.println System.out System System.out list.get(0) list.get list 0 String[] args args
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

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

		Scanner sc = new Scanner(System.in);
		Integer a = Integer.parseInt(sc.next());
		Integer b = Integer.parseInt(sc.next());

		List<String> list = new ArrayList<>();
		StringBuilder sb =  new StringBuilder();
		for(int i=0;i<b; i++) {
			sb.append(a.toString());
		}
		list.add(sb.toString());
		StringBuilder sb2 =  new StringBuilder();
		for(int i=0;i<a; i++) {
			sb2.append(b.toString());
		}
		list.add(sb2.toString());
		Collections.sort(list);
		System.out.println(list.get(0));

	}
}
