import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main
{
    public static void main(String[] args)
    {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(1, in, out);
        out.close();
    }

    static class Task
    {
        public void solve(int testNumber, Scanner in, PrintWriter out)
        {
            String a = Integer.toString(in.nextInt());
            String b = Integer.toString(in.nextInt());
            String aa = "";
            String bb = "";

            int b_count = Integer.parseInt(b);
            while (b_count-- > 0)
            {
                aa += a;
            }

            int a_count = Integer.parseInt(a);
            while (a_count-- > 0)
            {
                bb += b;
            }
            if (aa.compareTo(bb) < 0)
            {
                out.print(aa);
            } else
            {
                out.print(bb);
            }

        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main
{
    public static void main(String[] args)
    {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(1, in, out);
        out.close();
    }

    static class Task
    {
        public void solve(int testNumber, Scanner in, PrintWriter out)
        {
            String a = Integer.toString(in.nextInt());
            String b = Integer.toString(in.nextInt());
            String aa = "";
            String bb = "";

            int b_count = Integer.parseInt(b);
            while (b_count-- > 0)
            {
                aa += a;
            }

            int a_count = Integer.parseInt(a);
            while (a_count-- > 0)
            {
                bb += b;
            }
            if (aa.compareTo(bb) < 0)
            {
                out.print(aa);
            } else
            {
                out.print(bb);
            }

        }

    }
} Main public static void main(String[] args)
    {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) Task solver = new Task(); solver new Task() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class Task
    {
        public void solve(int testNumber, Scanner in, PrintWriter out)
        {
            String a = Integer.toString(in.nextInt());
            String b = Integer.toString(in.nextInt());
            String aa = "";
            String bb = "";

            int b_count = Integer.parseInt(b);
            while (b_count-- > 0)
            {
                aa += a;
            }

            int a_count = Integer.parseInt(a);
            while (a_count-- > 0)
            {
                bb += b;
            }
            if (aa.compareTo(bb) < 0)
            {
                out.print(aa);
            } else
            {
                out.print(bb);
            }

        }

    } Task public void solve(int testNumber, Scanner in, PrintWriter out)
        {
            String a = Integer.toString(in.nextInt());
            String b = Integer.toString(in.nextInt());
            String aa = "";
            String bb = "";

            int b_count = Integer.parseInt(b);
            while (b_count-- > 0)
            {
                aa += a;
            }

            int a_count = Integer.parseInt(a);
            while (a_count-- > 0)
            {
                bb += b;
            }
            if (aa.compareTo(bb) < 0)
            {
                out.print(aa);
            } else
            {
                out.print(bb);
            }

        } solve {
            String a = Integer.toString(in.nextInt());
            String b = Integer.toString(in.nextInt());
            String aa = "";
            String bb = "";

            int b_count = Integer.parseInt(b);
            while (b_count-- > 0)
            {
                aa += a;
            }

            int a_count = Integer.parseInt(a);
            while (a_count-- > 0)
            {
                bb += b;
            }
            if (aa.compareTo(bb) < 0)
            {
                out.print(aa);
            } else
            {
                out.print(bb);
            }

        } String a = Integer.toString(in.nextInt()); a Integer.toString(in.nextInt()) Integer.toString Integer in.nextInt() in.nextInt in String b = Integer.toString(in.nextInt()); b Integer.toString(in.nextInt()) Integer.toString Integer in.nextInt() in.nextInt in String aa = ""; aa "" String bb = ""; bb "" int b_count = Integer.parseInt(b); b_count Integer.parseInt(b) Integer.parseInt Integer b while (b_count-- > 0)
            {
                aa += a;
            } b_count-- > 0 b_count-- b_count 0 {
                aa += a;
            } aa += a aa a int a_count = Integer.parseInt(a); a_count Integer.parseInt(a) Integer.parseInt Integer a while (a_count-- > 0)
            {
                bb += b;
            } a_count-- > 0 a_count-- a_count 0 {
                bb += b;
            } bb += b bb b if (aa.compareTo(bb) < 0)
            {
                out.print(aa);
            } else
            {
                out.print(bb);
            } aa.compareTo(bb) < 0 aa.compareTo(bb) aa.compareTo aa bb 0 {
                out.print(aa);
            } out.print(aa) out.print out aa {
                out.print(bb);
            } out.print(bb) out.print out bb int testNumber testNumber Scanner in in PrintWriter out out public class Main
{
    public static void main(String[] args)
    {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(1, in, out);
        out.close();
    }

    static class Task
    {
        public void solve(int testNumber, Scanner in, PrintWriter out)
        {
            String a = Integer.toString(in.nextInt());
            String b = Integer.toString(in.nextInt());
            String aa = "";
            String bb = "";

            int b_count = Integer.parseInt(b);
            while (b_count-- > 0)
            {
                aa += a;
            }

            int a_count = Integer.parseInt(a);
            while (a_count-- > 0)
            {
                bb += b;
            }
            if (aa.compareTo(bb) < 0)
            {
                out.print(aa);
            } else
            {
                out.print(bb);
            }

        }

    }
} public class Main
{
    public static void main(String[] args)
    {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(1, in, out);
        out.close();
    }

    static class Task
    {
        public void solve(int testNumber, Scanner in, PrintWriter out)
        {
            String a = Integer.toString(in.nextInt());
            String b = Integer.toString(in.nextInt());
            String aa = "";
            String bb = "";

            int b_count = Integer.parseInt(b);
            while (b_count-- > 0)
            {
                aa += a;
            }

            int a_count = Integer.parseInt(a);
            while (a_count-- > 0)
            {
                bb += b;
            }
            if (aa.compareTo(bb) < 0)
            {
                out.print(aa);
            } else
            {
                out.print(bb);
            }

        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main
{
    public static void main(String[] args)
    {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(1, in, out);
        out.close();
    }

    static class Task
    {
        public void solve(int testNumber, Scanner in, PrintWriter out)
        {
            String a = Integer.toString(in.nextInt());
            String b = Integer.toString(in.nextInt());
            String aa = "";
            String bb = "";

            int b_count = Integer.parseInt(b);
            while (b_count-- > 0)
            {
                aa += a;
            }

            int a_count = Integer.parseInt(a);
            while (a_count-- > 0)
            {
                bb += b;
            }
            if (aa.compareTo(bb) < 0)
            {
                out.print(aa);
            } else
            {
                out.print(bb);
            }

        }

    }
}

