import java.io.*;
import java.util.ArrayList;
import java.util.BitSet;
import java.util.HashSet;
import java.util.StringTokenizer;

public class Main {
static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
static PrintWriter pw =new PrintWriter(new OutputStreamWriter(System.out));
static StringTokenizer st;
static BitSet bs;
static int TC,N,M,a,b,n;
static int [] values;
    public static void main(String[] args) throws IOException {
        // write your code here
        st= new StringTokenizer(br.readLine());
        a = Integer.parseInt(st.nextToken());
        b = Integer.parseInt(st.nextToken());
        String sum = "";
        String sumA = "";
        for (int i=0;i<a;i++)
            sum+=b;
        for (int j=0;j<b;j++)
            sumA+=a;
        pw.println(sum.compareTo(sumA)<0?sum:sumA);pw.flush();


    }

    private static boolean condition(int A, int B) {
        int firstDigit = firstDigit(B);
        int firstDigitA = firstDigit(A);
        return (A%10)==firstDigit&&firstDigitA==B%10;
    }
    static int firstDigit(int n)
    {

        int digits = (int)(Math.log10(n));
        n = (int)(n / (int)(Math.pow(10, digits)));
        return n;
    }
} import java.io.*; io.* java import java.util.ArrayList; ArrayList java.util import java.util.BitSet; BitSet java.util import java.util.HashSet; HashSet java.util import java.util.StringTokenizer; StringTokenizer java.util public class Main {
static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
static PrintWriter pw =new PrintWriter(new OutputStreamWriter(System.out));
static StringTokenizer st;
static BitSet bs;
static int TC,N,M,a,b,n;
static int [] values;
    public static void main(String[] args) throws IOException {
        // write your code here
        st= new StringTokenizer(br.readLine());
        a = Integer.parseInt(st.nextToken());
        b = Integer.parseInt(st.nextToken());
        String sum = "";
        String sumA = "";
        for (int i=0;i<a;i++)
            sum+=b;
        for (int j=0;j<b;j++)
            sumA+=a;
        pw.println(sum.compareTo(sumA)<0?sum:sumA);pw.flush();


    }

    private static boolean condition(int A, int B) {
        int firstDigit = firstDigit(B);
        int firstDigitA = firstDigit(A);
        return (A%10)==firstDigit&&firstDigitA==B%10;
    }
    static int firstDigit(int n)
    {

        int digits = (int)(Math.log10(n));
        n = (int)(n / (int)(Math.pow(10, digits)));
        return n;
    }
} Main static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) static PrintWriter pw =new PrintWriter(new OutputStreamWriter(System.out)); pw new PrintWriter(new OutputStreamWriter(System.out)) static StringTokenizer st; st static BitSet bs; bs static int TC TC N N M M a a b b n; n static int [] values; values public static void main(String[] args) throws IOException {
        // write your code here
        st= new StringTokenizer(br.readLine());
        a = Integer.parseInt(st.nextToken());
        b = Integer.parseInt(st.nextToken());
        String sum = "";
        String sumA = "";
        for (int i=0;i<a;i++)
            sum+=b;
        for (int j=0;j<b;j++)
            sumA+=a;
        pw.println(sum.compareTo(sumA)<0?sum:sumA);pw.flush();


    } main {
        // write your code here
        st= new StringTokenizer(br.readLine());
        a = Integer.parseInt(st.nextToken());
        b = Integer.parseInt(st.nextToken());
        String sum = "";
        String sumA = "";
        for (int i=0;i<a;i++)
            sum+=b;
        for (int j=0;j<b;j++)
            sumA+=a;
        pw.println(sum.compareTo(sumA)<0?sum:sumA);pw.flush();


    } st= new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) a = Integer.parseInt(st.nextToken()) a Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st b = Integer.parseInt(st.nextToken()) b Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st String sum = ""; sum "" String sumA = ""; sumA "" for (int i=0;i<a;i++)
            sum+=b; int i=0; int i=0; i 0 i<a i a i++ i++ i sum+=b; sum+=b sum b for (int j=0;j<b;j++)
            sumA+=a; int j=0; int j=0; j 0 j<b j b j++ j++ j sumA+=a; sumA+=a sumA a pw.println(sum.compareTo(sumA)<0?sum:sumA) pw.println pw sum.compareTo(sumA)<0?sum:sumA sum.compareTo(sumA)<0 sum.compareTo(sumA) sum.compareTo sum sumA 0 sum sumA pw.flush() pw.flush pw String[] args args private static boolean condition(int A, int B) {
        int firstDigit = firstDigit(B);
        int firstDigitA = firstDigit(A);
        return (A%10)==firstDigit&&firstDigitA==B%10;
    } condition {
        int firstDigit = firstDigit(B);
        int firstDigitA = firstDigit(A);
        return (A%10)==firstDigit&&firstDigitA==B%10;
    } int firstDigit = firstDigit(B); firstDigit firstDigit(B) firstDigit B int firstDigitA = firstDigit(A); firstDigitA firstDigit(A) firstDigit A return (A%10)==firstDigit&&firstDigitA==B%10; (A%10)==firstDigit&&firstDigitA==B%10 (A%10)==firstDigit (A%10) A 10 firstDigit firstDigitA==B%10 firstDigitA B%10 B 10 int A A int B B static int firstDigit(int n)
    {

        int digits = (int)(Math.log10(n));
        n = (int)(n / (int)(Math.pow(10, digits)));
        return n;
    } firstDigit {

        int digits = (int)(Math.log10(n));
        n = (int)(n / (int)(Math.pow(10, digits)));
        return n;
    } int digits = (int)(Math.log10(n)); digits (int)(Math.log10(n)) Math.log10 Math n n = (int)(n / (int)(Math.pow(10, digits))) n (int)(n / (int)(Math.pow(10, digits))) n (int)(Math.pow(10, digits)) Math.pow Math 10 digits return n; n int n n public class Main {
static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
static PrintWriter pw =new PrintWriter(new OutputStreamWriter(System.out));
static StringTokenizer st;
static BitSet bs;
static int TC,N,M,a,b,n;
static int [] values;
    public static void main(String[] args) throws IOException {
        // write your code here
        st= new StringTokenizer(br.readLine());
        a = Integer.parseInt(st.nextToken());
        b = Integer.parseInt(st.nextToken());
        String sum = "";
        String sumA = "";
        for (int i=0;i<a;i++)
            sum+=b;
        for (int j=0;j<b;j++)
            sumA+=a;
        pw.println(sum.compareTo(sumA)<0?sum:sumA);pw.flush();


    }

    private static boolean condition(int A, int B) {
        int firstDigit = firstDigit(B);
        int firstDigitA = firstDigit(A);
        return (A%10)==firstDigit&&firstDigitA==B%10;
    }
    static int firstDigit(int n)
    {

        int digits = (int)(Math.log10(n));
        n = (int)(n / (int)(Math.pow(10, digits)));
        return n;
    }
} public class Main {
static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
static PrintWriter pw =new PrintWriter(new OutputStreamWriter(System.out));
static StringTokenizer st;
static BitSet bs;
static int TC,N,M,a,b,n;
static int [] values;
    public static void main(String[] args) throws IOException {
        // write your code here
        st= new StringTokenizer(br.readLine());
        a = Integer.parseInt(st.nextToken());
        b = Integer.parseInt(st.nextToken());
        String sum = "";
        String sumA = "";
        for (int i=0;i<a;i++)
            sum+=b;
        for (int j=0;j<b;j++)
            sumA+=a;
        pw.println(sum.compareTo(sumA)<0?sum:sumA);pw.flush();


    }

    private static boolean condition(int A, int B) {
        int firstDigit = firstDigit(B);
        int firstDigitA = firstDigit(A);
        return (A%10)==firstDigit&&firstDigitA==B%10;
    }
    static int firstDigit(int n)
    {

        int digits = (int)(Math.log10(n));
        n = (int)(n / (int)(Math.pow(10, digits)));
        return n;
    }
} Main
import java.io.*;
import java.util.ArrayList;
import java.util.BitSet;
import java.util.HashSet;
import java.util.StringTokenizer;

public class Main {
static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
static PrintWriter pw =new PrintWriter(new OutputStreamWriter(System.out));
static StringTokenizer st;
static BitSet bs;
static int TC,N,M,a,b,n;
static int [] values;
    public static void main(String[] args) throws IOException {
        // write your code here
        st= new StringTokenizer(br.readLine());
        a = Integer.parseInt(st.nextToken());
        b = Integer.parseInt(st.nextToken());
        String sum = "";
        String sumA = "";
        for (int i=0;i<a;i++)
            sum+=b;
        for (int j=0;j<b;j++)
            sumA+=a;
        pw.println(sum.compareTo(sumA)<0?sum:sumA);pw.flush();


    }

    private static boolean condition(int A, int B) {
        int firstDigit = firstDigit(B);
        int firstDigitA = firstDigit(A);
        return (A%10)==firstDigit&&firstDigitA==B%10;
    }
    static int firstDigit(int n)
    {

        int digits = (int)(Math.log10(n));
        n = (int)(n / (int)(Math.pow(10, digits)));
        return n;
    }
}
