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

/**
 * 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);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 整数の入力
            int a = Integer.parseInt(in.next());
            int b = Integer.parseInt(in.next());
            StringBuilder sba = new StringBuilder();
            StringBuilder sbb = new StringBuilder();
            for (int i = 0; i < b; i++) {
                sba.append(a);
            }
            for (int i = 0; i < a; i++) {
                sbb.append(b);
            }
            if (sba.toString().compareTo(sbb.toString()) > 0) {
                out.println(sbb.toString());
            } else {
                out.println(sba.toString());
            }


        }

    }
}
 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 import java.lang.StringBuilder; StringBuilder java.lang 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);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 整数の入力
            int a = Integer.parseInt(in.next());
            int b = Integer.parseInt(in.next());
            StringBuilder sba = new StringBuilder();
            StringBuilder sbb = new StringBuilder();
            for (int i = 0; i < b; i++) {
                sba.append(a);
            }
            for (int i = 0; i < a; i++) {
                sbb.append(b);
            }
            if (sba.toString().compareTo(sbb.toString()) > 0) {
                out.println(sbb.toString());
            } else {
                out.println(sba.toString());
            }


        }

    }
} 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);
        B solver = new B();
        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);
        B solver = new B();
        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) B solver = new B(); solver new B() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 整数の入力
            int a = Integer.parseInt(in.next());
            int b = Integer.parseInt(in.next());
            StringBuilder sba = new StringBuilder();
            StringBuilder sbb = new StringBuilder();
            for (int i = 0; i < b; i++) {
                sba.append(a);
            }
            for (int i = 0; i < a; i++) {
                sbb.append(b);
            }
            if (sba.toString().compareTo(sbb.toString()) > 0) {
                out.println(sbb.toString());
            } else {
                out.println(sba.toString());
            }


        }

    } B public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 整数の入力
            int a = Integer.parseInt(in.next());
            int b = Integer.parseInt(in.next());
            StringBuilder sba = new StringBuilder();
            StringBuilder sbb = new StringBuilder();
            for (int i = 0; i < b; i++) {
                sba.append(a);
            }
            for (int i = 0; i < a; i++) {
                sbb.append(b);
            }
            if (sba.toString().compareTo(sbb.toString()) > 0) {
                out.println(sbb.toString());
            } else {
                out.println(sba.toString());
            }


        } solve {
            // 整数の入力
            int a = Integer.parseInt(in.next());
            int b = Integer.parseInt(in.next());
            StringBuilder sba = new StringBuilder();
            StringBuilder sbb = new StringBuilder();
            for (int i = 0; i < b; i++) {
                sba.append(a);
            }
            for (int i = 0; i < a; i++) {
                sbb.append(b);
            }
            if (sba.toString().compareTo(sbb.toString()) > 0) {
                out.println(sbb.toString());
            } else {
                out.println(sba.toString());
            }


        } int a = Integer.parseInt(in.next()); a Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in int b = Integer.parseInt(in.next()); b Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in StringBuilder sba = new StringBuilder(); sba new StringBuilder() StringBuilder sbb = new StringBuilder(); sbb new StringBuilder() for (int i = 0; i < b; i++) {
                sba.append(a);
            } int i = 0; int i = 0; i 0 i < b i b i++ i++ i {
                sba.append(a);
            } {
                sba.append(a);
            } sba.append(a) sba.append sba a for (int i = 0; i < a; i++) {
                sbb.append(b);
            } int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
                sbb.append(b);
            } {
                sbb.append(b);
            } sbb.append(b) sbb.append sbb b if (sba.toString().compareTo(sbb.toString()) > 0) {
                out.println(sbb.toString());
            } else {
                out.println(sba.toString());
            } sba.toString().compareTo(sbb.toString()) > 0 sba.toString().compareTo(sbb.toString()) sba.toString().compareTo sba.toString() sba.toString sba sbb.toString() sbb.toString sbb 0 {
                out.println(sbb.toString());
            } out.println(sbb.toString()) out.println out sbb.toString() sbb.toString sbb {
                out.println(sba.toString());
            } out.println(sba.toString()) out.println out sba.toString() sba.toString sba 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);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 整数の入力
            int a = Integer.parseInt(in.next());
            int b = Integer.parseInt(in.next());
            StringBuilder sba = new StringBuilder();
            StringBuilder sbb = new StringBuilder();
            for (int i = 0; i < b; i++) {
                sba.append(a);
            }
            for (int i = 0; i < a; i++) {
                sbb.append(b);
            }
            if (sba.toString().compareTo(sbb.toString()) > 0) {
                out.println(sbb.toString());
            } else {
                out.println(sba.toString());
            }


        }

    }
} 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);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 整数の入力
            int a = Integer.parseInt(in.next());
            int b = Integer.parseInt(in.next());
            StringBuilder sba = new StringBuilder();
            StringBuilder sbb = new StringBuilder();
            for (int i = 0; i < b; i++) {
                sba.append(a);
            }
            for (int i = 0; i < a; i++) {
                sbb.append(b);
            }
            if (sba.toString().compareTo(sbb.toString()) > 0) {
                out.println(sbb.toString());
            } else {
                out.println(sba.toString());
            }


        }

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

/**
 * 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);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 整数の入力
            int a = Integer.parseInt(in.next());
            int b = Integer.parseInt(in.next());
            StringBuilder sba = new StringBuilder();
            StringBuilder sbb = new StringBuilder();
            for (int i = 0; i < b; i++) {
                sba.append(a);
            }
            for (int i = 0; i < a; i++) {
                sbb.append(b);
            }
            if (sba.toString().compareTo(sbb.toString()) > 0) {
                out.println(sbb.toString());
            } else {
                out.println(sba.toString());
            }


        }

    }
}

