import java.util.PriorityQueue;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		try(Scanner sc = new Scanner(System.in)) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			StringBuilder ab = new StringBuilder();
			for(int i = 0 ; i < b ; i++) {
				ab.append(a);
			}
			StringBuilder ba = new StringBuilder();
			for(int i = 0 ; i < a ; i++) {
				ba.append(b);
			}
			PriorityQueue<String> q = new PriorityQueue<>();
			q.add(ab.toString());
			q.add(ba.toString());

			System.out.println(q.peek());
		}

	}

} import java.util.PriorityQueue; PriorityQueue java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		try(Scanner sc = new Scanner(System.in)) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			StringBuilder ab = new StringBuilder();
			for(int i = 0 ; i < b ; i++) {
				ab.append(a);
			}
			StringBuilder ba = new StringBuilder();
			for(int i = 0 ; i < a ; i++) {
				ba.append(b);
			}
			PriorityQueue<String> q = new PriorityQueue<>();
			q.add(ab.toString());
			q.add(ba.toString());

			System.out.println(q.peek());
		}

	}

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

		try(Scanner sc = new Scanner(System.in)) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			StringBuilder ab = new StringBuilder();
			for(int i = 0 ; i < b ; i++) {
				ab.append(a);
			}
			StringBuilder ba = new StringBuilder();
			for(int i = 0 ; i < a ; i++) {
				ba.append(b);
			}
			PriorityQueue<String> q = new PriorityQueue<>();
			q.add(ab.toString());
			q.add(ba.toString());

			System.out.println(q.peek());
		}

	} main {

		try(Scanner sc = new Scanner(System.in)) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			StringBuilder ab = new StringBuilder();
			for(int i = 0 ; i < b ; i++) {
				ab.append(a);
			}
			StringBuilder ba = new StringBuilder();
			for(int i = 0 ; i < a ; i++) {
				ba.append(b);
			}
			PriorityQueue<String> q = new PriorityQueue<>();
			q.add(ab.toString());
			q.add(ba.toString());

			System.out.println(q.peek());
		}

	} try(Scanner sc = new Scanner(System.in)) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			StringBuilder ab = new StringBuilder();
			for(int i = 0 ; i < b ; i++) {
				ab.append(a);
			}
			StringBuilder ba = new StringBuilder();
			for(int i = 0 ; i < a ; i++) {
				ba.append(b);
			}
			PriorityQueue<String> q = new PriorityQueue<>();
			q.add(ab.toString());
			q.add(ba.toString());

			System.out.println(q.peek());
		} {
			int a = sc.nextInt();
			int b = sc.nextInt();
			StringBuilder ab = new StringBuilder();
			for(int i = 0 ; i < b ; i++) {
				ab.append(a);
			}
			StringBuilder ba = new StringBuilder();
			for(int i = 0 ; i < a ; i++) {
				ba.append(b);
			}
			PriorityQueue<String> q = new PriorityQueue<>();
			q.add(ab.toString());
			q.add(ba.toString());

			System.out.println(q.peek());
		} Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc StringBuilder ab = new StringBuilder(); ab new StringBuilder() for(int i = 0 ; i < b ; i++) {
				ab.append(a);
			} int i = 0 ; int i = 0 ; i 0 i < b i b i++ i++ i {
				ab.append(a);
			} {
				ab.append(a);
			} ab.append(a) ab.append ab a StringBuilder ba = new StringBuilder(); ba new StringBuilder() for(int i = 0 ; i < a ; i++) {
				ba.append(b);
			} int i = 0 ; int i = 0 ; i 0 i < a i a i++ i++ i {
				ba.append(b);
			} {
				ba.append(b);
			} ba.append(b) ba.append ba b PriorityQueue<String> q = new PriorityQueue<>(); q new PriorityQueue<>() q.add(ab.toString()) q.add q ab.toString() ab.toString ab q.add(ba.toString()) q.add q ba.toString() ba.toString ba System.out.println(q.peek()) System.out.println System.out System System.out q.peek() q.peek q String[] args args public class Main {

	public static void main(String[] args) {

		try(Scanner sc = new Scanner(System.in)) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			StringBuilder ab = new StringBuilder();
			for(int i = 0 ; i < b ; i++) {
				ab.append(a);
			}
			StringBuilder ba = new StringBuilder();
			for(int i = 0 ; i < a ; i++) {
				ba.append(b);
			}
			PriorityQueue<String> q = new PriorityQueue<>();
			q.add(ab.toString());
			q.add(ba.toString());

			System.out.println(q.peek());
		}

	}

} public class Main {

	public static void main(String[] args) {

		try(Scanner sc = new Scanner(System.in)) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			StringBuilder ab = new StringBuilder();
			for(int i = 0 ; i < b ; i++) {
				ab.append(a);
			}
			StringBuilder ba = new StringBuilder();
			for(int i = 0 ; i < a ; i++) {
				ba.append(b);
			}
			PriorityQueue<String> q = new PriorityQueue<>();
			q.add(ab.toString());
			q.add(ba.toString());

			System.out.println(q.peek());
		}

	}

} Main
import java.util.PriorityQueue;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		try(Scanner sc = new Scanner(System.in)) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			StringBuilder ab = new StringBuilder();
			for(int i = 0 ; i < b ; i++) {
				ab.append(a);
			}
			StringBuilder ba = new StringBuilder();
			for(int i = 0 ; i < a ; i++) {
				ba.append(b);
			}
			PriorityQueue<String> q = new PriorityQueue<>();
			q.add(ab.toString());
			q.add(ba.toString());

			System.out.println(q.peek());
		}

	}

}
