import java.util.Scanner;

class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String A = "";
		String B = "";
		for(int i=0;i<b;i++){
			A = A + String.valueOf(a);
		}
		for(int i=0;i<a;i++){
			B = B + String.valueOf(b);
		}
		if(A.compareTo(B)<=0){
			System.out.println(A);
		}else{
			System.out.println(B);
		}

	}
} import java.util.Scanner; Scanner java.util class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String A = "";
		String B = "";
		for(int i=0;i<b;i++){
			A = A + String.valueOf(a);
		}
		for(int i=0;i<a;i++){
			B = B + String.valueOf(b);
		}
		if(A.compareTo(B)<=0){
			System.out.println(A);
		}else{
			System.out.println(B);
		}

	}
} Main public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String A = "";
		String B = "";
		for(int i=0;i<b;i++){
			A = A + String.valueOf(a);
		}
		for(int i=0;i<a;i++){
			B = B + String.valueOf(b);
		}
		if(A.compareTo(B)<=0){
			System.out.println(A);
		}else{
			System.out.println(B);
		}

	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String A = "";
		String B = "";
		for(int i=0;i<b;i++){
			A = A + String.valueOf(a);
		}
		for(int i=0;i<a;i++){
			B = B + String.valueOf(b);
		}
		if(A.compareTo(B)<=0){
			System.out.println(A);
		}else{
			System.out.println(B);
		}

	} 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 String A = ""; A "" String B = ""; B "" for(int i=0;i<b;i++){
			A = A + String.valueOf(a);
		} int i=0; int i=0; i 0 i<b i b i++ i++ i {
			A = A + String.valueOf(a);
		} {
			A = A + String.valueOf(a);
		} A = A + String.valueOf(a) A A + String.valueOf(a) A String.valueOf(a) String.valueOf String a for(int i=0;i<a;i++){
			B = B + String.valueOf(b);
		} int i=0; int i=0; i 0 i<a i a i++ i++ i {
			B = B + String.valueOf(b);
		} {
			B = B + String.valueOf(b);
		} B = B + String.valueOf(b) B B + String.valueOf(b) B String.valueOf(b) String.valueOf String b 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(B) System.out.println System.out System System.out B String args[] args
import java.util.Scanner;

class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String A = "";
		String B = "";
		for(int i=0;i<b;i++){
			A = A + String.valueOf(a);
		}
		for(int i=0;i<a;i++){
			B = B + String.valueOf(b);
		}
		if(A.compareTo(B)<=0){
			System.out.println(A);
		}else{
			System.out.println(B);
		}

	}
}
