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

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String a = sc.next();
		String b = sc.next();
		String sumA = "";
		String sumB = "";
		List<String> list = new ArrayList();
		for (int i = 0; i < Integer.parseInt(b); i++) {
			sumA += a;
		}
		for (int i = 0; i < Integer.parseInt(a); i++) {
			sumB += b;
		}
		list.add(sumA);
		list.add(sumB);
		Collections.sort(list);
		System.out.println(list.get(0));
		sc.close();
	}
} 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 public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String a = sc.next();
		String b = sc.next();
		String sumA = "";
		String sumB = "";
		List<String> list = new ArrayList();
		for (int i = 0; i < Integer.parseInt(b); i++) {
			sumA += a;
		}
		for (int i = 0; i < Integer.parseInt(a); i++) {
			sumB += b;
		}
		list.add(sumA);
		list.add(sumB);
		Collections.sort(list);
		System.out.println(list.get(0));
		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String a = sc.next();
		String b = sc.next();
		String sumA = "";
		String sumB = "";
		List<String> list = new ArrayList();
		for (int i = 0; i < Integer.parseInt(b); i++) {
			sumA += a;
		}
		for (int i = 0; i < Integer.parseInt(a); i++) {
			sumB += b;
		}
		list.add(sumA);
		list.add(sumB);
		Collections.sort(list);
		System.out.println(list.get(0));
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);

		String a = sc.next();
		String b = sc.next();
		String sumA = "";
		String sumB = "";
		List<String> list = new ArrayList();
		for (int i = 0; i < Integer.parseInt(b); i++) {
			sumA += a;
		}
		for (int i = 0; i < Integer.parseInt(a); i++) {
			sumB += b;
		}
		list.add(sumA);
		list.add(sumB);
		Collections.sort(list);
		System.out.println(list.get(0));
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String a = sc.next(); a sc.next() sc.next sc String b = sc.next(); b sc.next() sc.next sc String sumA = ""; sumA "" String sumB = ""; sumB "" List<String> list = new ArrayList(); list new ArrayList() for (int i = 0; i < Integer.parseInt(b); i++) {
			sumA += a;
		} int i = 0; int i = 0; i 0 i < Integer.parseInt(b) i Integer.parseInt(b) Integer.parseInt Integer b i++ i++ i {
			sumA += a;
		} {
			sumA += a;
		} sumA += a sumA a for (int i = 0; i < Integer.parseInt(a); i++) {
			sumB += b;
		} int i = 0; int i = 0; i 0 i < Integer.parseInt(a) i Integer.parseInt(a) Integer.parseInt Integer a i++ i++ i {
			sumB += b;
		} {
			sumB += b;
		} sumB += b sumB b list.add(sumA) list.add list sumA list.add(sumB) list.add list sumB 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 sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String a = sc.next();
		String b = sc.next();
		String sumA = "";
		String sumB = "";
		List<String> list = new ArrayList();
		for (int i = 0; i < Integer.parseInt(b); i++) {
			sumA += a;
		}
		for (int i = 0; i < Integer.parseInt(a); i++) {
			sumB += b;
		}
		list.add(sumA);
		list.add(sumB);
		Collections.sort(list);
		System.out.println(list.get(0));
		sc.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String a = sc.next();
		String b = sc.next();
		String sumA = "";
		String sumB = "";
		List<String> list = new ArrayList();
		for (int i = 0; i < Integer.parseInt(b); i++) {
			sumA += a;
		}
		for (int i = 0; i < Integer.parseInt(a); i++) {
			sumB += b;
		}
		list.add(sumA);
		list.add(sumB);
		Collections.sort(list);
		System.out.println(list.get(0));
		sc.close();
	}
} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String a = sc.next();
		String b = sc.next();
		String sumA = "";
		String sumB = "";
		List<String> list = new ArrayList();
		for (int i = 0; i < Integer.parseInt(b); i++) {
			sumA += a;
		}
		for (int i = 0; i < Integer.parseInt(a); i++) {
			sumB += b;
		}
		list.add(sumA);
		list.add(sumB);
		Collections.sort(list);
		System.out.println(list.get(0));
		sc.close();
	}
}