import java.lang.Character.Subset;
import java.util.Arrays;
import java.util.Scanner;
public class Main{
    public static void main(String[]args){
        Scanner scan = new Scanner(System.in);
        int a =scan.nextInt();
        int b = scan.nextInt();
        int a_sum,b_sum;
        a_sum=a;
        b_sum=b;
        int tmp,j;
        for(int i=0;i<b-1;i++){
            a_sum*=10;
            a_sum+=a;
        }
        for(int i=0;i<a-1;i++){
            b_sum*=10;
            b_sum+=b;
        }
        if(a>=b){
            System.out.println(b_sum);
        }
        else System.out.println(a_sum);
    }
} import java.lang.Character.Subset; Subset java.lang.Character import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[]args){
        Scanner scan = new Scanner(System.in);
        int a =scan.nextInt();
        int b = scan.nextInt();
        int a_sum,b_sum;
        a_sum=a;
        b_sum=b;
        int tmp,j;
        for(int i=0;i<b-1;i++){
            a_sum*=10;
            a_sum+=a;
        }
        for(int i=0;i<a-1;i++){
            b_sum*=10;
            b_sum+=b;
        }
        if(a>=b){
            System.out.println(b_sum);
        }
        else System.out.println(a_sum);
    }
} Main public static void main(String[]args){
        Scanner scan = new Scanner(System.in);
        int a =scan.nextInt();
        int b = scan.nextInt();
        int a_sum,b_sum;
        a_sum=a;
        b_sum=b;
        int tmp,j;
        for(int i=0;i<b-1;i++){
            a_sum*=10;
            a_sum+=a;
        }
        for(int i=0;i<a-1;i++){
            b_sum*=10;
            b_sum+=b;
        }
        if(a>=b){
            System.out.println(b_sum);
        }
        else System.out.println(a_sum);
    } main {
        Scanner scan = new Scanner(System.in);
        int a =scan.nextInt();
        int b = scan.nextInt();
        int a_sum,b_sum;
        a_sum=a;
        b_sum=b;
        int tmp,j;
        for(int i=0;i<b-1;i++){
            a_sum*=10;
            a_sum+=a;
        }
        for(int i=0;i<a-1;i++){
            b_sum*=10;
            b_sum+=b;
        }
        if(a>=b){
            System.out.println(b_sum);
        }
        else System.out.println(a_sum);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a =scan.nextInt(); a scan.nextInt() scan.nextInt scan int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan int a_sum a_sum b_sum; b_sum a_sum=a a_sum a b_sum=b b_sum b int tmp tmp j; j for(int i=0;i<b-1;i++){
            a_sum*=10;
            a_sum+=a;
        } int i=0; int i=0; i 0 i<b-1 i b-1 b 1 i++ i++ i {
            a_sum*=10;
            a_sum+=a;
        } {
            a_sum*=10;
            a_sum+=a;
        } a_sum*=10 a_sum 10 a_sum+=a a_sum a for(int i=0;i<a-1;i++){
            b_sum*=10;
            b_sum+=b;
        } int i=0; int i=0; i 0 i<a-1 i a-1 a 1 i++ i++ i {
            b_sum*=10;
            b_sum+=b;
        } {
            b_sum*=10;
            b_sum+=b;
        } b_sum*=10 b_sum 10 b_sum+=b b_sum b if(a>=b){
            System.out.println(b_sum);
        }
        else System.out.println(a_sum); a>=b a b {
            System.out.println(b_sum);
        } System.out.println(b_sum) System.out.println System.out System System.out b_sum System.out.println(a_sum) System.out.println System.out System System.out a_sum String[]args args public class Main{
    public static void main(String[]args){
        Scanner scan = new Scanner(System.in);
        int a =scan.nextInt();
        int b = scan.nextInt();
        int a_sum,b_sum;
        a_sum=a;
        b_sum=b;
        int tmp,j;
        for(int i=0;i<b-1;i++){
            a_sum*=10;
            a_sum+=a;
        }
        for(int i=0;i<a-1;i++){
            b_sum*=10;
            b_sum+=b;
        }
        if(a>=b){
            System.out.println(b_sum);
        }
        else System.out.println(a_sum);
    }
} public class Main{
    public static void main(String[]args){
        Scanner scan = new Scanner(System.in);
        int a =scan.nextInt();
        int b = scan.nextInt();
        int a_sum,b_sum;
        a_sum=a;
        b_sum=b;
        int tmp,j;
        for(int i=0;i<b-1;i++){
            a_sum*=10;
            a_sum+=a;
        }
        for(int i=0;i<a-1;i++){
            b_sum*=10;
            b_sum+=b;
        }
        if(a>=b){
            System.out.println(b_sum);
        }
        else System.out.println(a_sum);
    }
} Main
import java.lang.Character.Subset;
import java.util.Arrays;
import java.util.Scanner;
public class Main{
    public static void main(String[]args){
        Scanner scan = new Scanner(System.in);
        int a =scan.nextInt();
        int b = scan.nextInt();
        int a_sum,b_sum;
        a_sum=a;
        b_sum=b;
        int tmp,j;
        for(int i=0;i<b-1;i++){
            a_sum*=10;
            a_sum+=a;
        }
        for(int i=0;i<a-1;i++){
            b_sum*=10;
            b_sum+=b;
        }
        if(a>=b){
            System.out.println(b_sum);
        }
        else System.out.println(a_sum);
    }
}