import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws Exception {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	String a = sc.next();
    	String b = sc.next();
    	sc.close();
    	String A = "";
    	String B = "";
    	for(int i = 0; i < Integer.parseInt(b); i++){
    		A = A.concat(a);
    	}
    	for(int i = 0; i < Integer.parseInt(a); i++){
    		B = B.concat(b);
    	}
    	if(0 <= A.compareTo(B)){
    		System.out.println(B);
    	}else{
    		System.out.println(A);
    	}


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

    public static void main(String[] args) throws Exception {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	String a = sc.next();
    	String b = sc.next();
    	sc.close();
    	String A = "";
    	String B = "";
    	for(int i = 0; i < Integer.parseInt(b); i++){
    		A = A.concat(a);
    	}
    	for(int i = 0; i < Integer.parseInt(a); i++){
    		B = B.concat(b);
    	}
    	if(0 <= A.compareTo(B)){
    		System.out.println(B);
    	}else{
    		System.out.println(A);
    	}


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

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	String a = sc.next();
    	String b = sc.next();
    	sc.close();
    	String A = "";
    	String B = "";
    	for(int i = 0; i < Integer.parseInt(b); i++){
    		A = A.concat(a);
    	}
    	for(int i = 0; i < Integer.parseInt(a); i++){
    		B = B.concat(b);
    	}
    	if(0 <= A.compareTo(B)){
    		System.out.println(B);
    	}else{
    		System.out.println(A);
    	}


    } main {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	String a = sc.next();
    	String b = sc.next();
    	sc.close();
    	String A = "";
    	String B = "";
    	for(int i = 0; i < Integer.parseInt(b); i++){
    		A = A.concat(a);
    	}
    	for(int i = 0; i < Integer.parseInt(a); i++){
    		B = B.concat(b);
    	}
    	if(0 <= A.compareTo(B)){
    		System.out.println(B);
    	}else{
    		System.out.println(A);
    	}


    } 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 sc.close() sc.close sc String A = ""; A "" String B = ""; B "" for(int i = 0; i < Integer.parseInt(b); i++){
    		A = A.concat(a);
    	} int i = 0; int i = 0; i 0 i < Integer.parseInt(b) i Integer.parseInt(b) Integer.parseInt Integer b i++ i++ i {
    		A = A.concat(a);
    	} {
    		A = A.concat(a);
    	} A = A.concat(a) A A.concat(a) A.concat A a for(int i = 0; i < Integer.parseInt(a); i++){
    		B = B.concat(b);
    	} int i = 0; int i = 0; i 0 i < Integer.parseInt(a) i Integer.parseInt(a) Integer.parseInt Integer a i++ i++ i {
    		B = B.concat(b);
    	} {
    		B = B.concat(b);
    	} B = B.concat(b) B B.concat(b) B.concat B b if(0 <= A.compareTo(B)){
    		System.out.println(B);
    	}else{
    		System.out.println(A);
    	} 0 <= A.compareTo(B) 0 A.compareTo(B) A.compareTo A B {
    		System.out.println(B);
    	} System.out.println(B) System.out.println System.out System System.out B {
    		System.out.println(A);
    	} System.out.println(A) System.out.println System.out System System.out A String[] args args public class Main {

    public static void main(String[] args) throws Exception {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	String a = sc.next();
    	String b = sc.next();
    	sc.close();
    	String A = "";
    	String B = "";
    	for(int i = 0; i < Integer.parseInt(b); i++){
    		A = A.concat(a);
    	}
    	for(int i = 0; i < Integer.parseInt(a); i++){
    		B = B.concat(b);
    	}
    	if(0 <= A.compareTo(B)){
    		System.out.println(B);
    	}else{
    		System.out.println(A);
    	}


    }
} public class Main {

    public static void main(String[] args) throws Exception {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	String a = sc.next();
    	String b = sc.next();
    	sc.close();
    	String A = "";
    	String B = "";
    	for(int i = 0; i < Integer.parseInt(b); i++){
    		A = A.concat(a);
    	}
    	for(int i = 0; i < Integer.parseInt(a); i++){
    		B = B.concat(b);
    	}
    	if(0 <= A.compareTo(B)){
    		System.out.println(B);
    	}else{
    		System.out.println(A);
    	}


    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws Exception {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	String a = sc.next();
    	String b = sc.next();
    	sc.close();
    	String A = "";
    	String B = "";
    	for(int i = 0; i < Integer.parseInt(b); i++){
    		A = A.concat(a);
    	}
    	for(int i = 0; i < Integer.parseInt(a); i++){
    		B = B.concat(b);
    	}
    	if(0 <= A.compareTo(B)){
    		System.out.println(B);
    	}else{
    		System.out.println(A);
    	}


    }
}