import java.util.*;
//import java.util.stream.Collectors;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		String a = sc.next();
		String b = sc.next();
		String resultA = "";
		String resultB = "";
		for(int i=0; i<Integer.parseInt(b); i++){
			resultA += a;
		}
		for(int i=0; i<Integer.parseInt(a); i++){
			resultB += b;
		}
		System.out.println(resultA.compareTo(resultB) < 0 ? resultA : resultB);
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		String a = sc.next();
		String b = sc.next();
		String resultA = "";
		String resultB = "";
		for(int i=0; i<Integer.parseInt(b); i++){
			resultA += a;
		}
		for(int i=0; i<Integer.parseInt(a); i++){
			resultB += b;
		}
		System.out.println(resultA.compareTo(resultB) < 0 ? resultA : resultB);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		String a = sc.next();
		String b = sc.next();
		String resultA = "";
		String resultB = "";
		for(int i=0; i<Integer.parseInt(b); i++){
			resultA += a;
		}
		for(int i=0; i<Integer.parseInt(a); i++){
			resultB += b;
		}
		System.out.println(resultA.compareTo(resultB) < 0 ? resultA : resultB);
	} main {
		Scanner sc = new Scanner(System.in);
		
		String a = sc.next();
		String b = sc.next();
		String resultA = "";
		String resultB = "";
		for(int i=0; i<Integer.parseInt(b); i++){
			resultA += a;
		}
		for(int i=0; i<Integer.parseInt(a); i++){
			resultB += b;
		}
		System.out.println(resultA.compareTo(resultB) < 0 ? resultA : resultB);
	} 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 resultA = ""; resultA "" String resultB = ""; resultB "" for(int i=0; i<Integer.parseInt(b); i++){
			resultA += a;
		} int i=0; int i=0; i 0 i<Integer.parseInt(b) i Integer.parseInt(b) Integer.parseInt Integer b i++ i++ i {
			resultA += a;
		} {
			resultA += a;
		} resultA += a resultA a for(int i=0; i<Integer.parseInt(a); i++){
			resultB += b;
		} int i=0; int i=0; i 0 i<Integer.parseInt(a) i Integer.parseInt(a) Integer.parseInt Integer a i++ i++ i {
			resultB += b;
		} {
			resultB += b;
		} resultB += b resultB b System.out.println(resultA.compareTo(resultB) < 0 ? resultA : resultB) System.out.println System.out System System.out resultA.compareTo(resultB) < 0 ? resultA : resultB resultA.compareTo(resultB) < 0 resultA.compareTo(resultB) resultA.compareTo resultA resultB 0 resultA resultB 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 resultA = "";
		String resultB = "";
		for(int i=0; i<Integer.parseInt(b); i++){
			resultA += a;
		}
		for(int i=0; i<Integer.parseInt(a); i++){
			resultB += b;
		}
		System.out.println(resultA.compareTo(resultB) < 0 ? resultA : resultB);
	}
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		String a = sc.next();
		String b = sc.next();
		String resultA = "";
		String resultB = "";
		for(int i=0; i<Integer.parseInt(b); i++){
			resultA += a;
		}
		for(int i=0; i<Integer.parseInt(a); i++){
			resultB += b;
		}
		System.out.println(resultA.compareTo(resultB) < 0 ? resultA : resultB);
	}
} Main
import java.util.*;
//import java.util.stream.Collectors;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		String a = sc.next();
		String b = sc.next();
		String resultA = "";
		String resultB = "";
		for(int i=0; i<Integer.parseInt(b); i++){
			resultA += a;
		}
		for(int i=0; i<Integer.parseInt(a); i++){
			resultB += b;
		}
		System.out.println(resultA.compareTo(resultB) < 0 ? resultA : resultB);
	}
}
