import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner scanner = new Scanner(System.in);
        String a = scanner.next(); //文字列a
        int A = Integer.parseInt(a); //数字A
        String b = scanner.next(); //文字列b
        int B = Integer.parseInt(b); //数字B
        
        String a_sum = "";
        String b_sum = "";
        
        for(int i=0; i<B; i++){
            a_sum = a_sum +a;
        }
        
        for(int i=0; i<A; i++){
            b_sum = b_sum +b;
        }
        
        int A_sum = Integer.parseInt(a_sum);
        int B_sum = Integer.parseInt(b_sum);
        
        if(A<=B){
            System.out.println(A_sum);
        }else{
            System.out.println(B_sum);
        }
        
    }
}

/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz