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

    static class BComparingStrings {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt();
            int b = in.nextInt();

            StringBuilder ar = new StringBuilder();
            StringBuilder br = new StringBuilder();

            for (int i = 0; i < b; i++) {
                ar.append(a);
            }

            for (int j = 0; j < a; j++) {
                br.append(b);
            }

            int ans = ar.toString().compareTo(br.toString());

            if (ans > 0) out.println(br);
            else out.println(ar);
        }

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

    static class BComparingStrings {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt();
            int b = in.nextInt();

            StringBuilder ar = new StringBuilder();
            StringBuilder br = new StringBuilder();

            for (int i = 0; i < b; i++) {
                ar.append(a);
            }

            for (int j = 0; j < a; j++) {
                br.append(b);
            }

            int ans = ar.toString().compareTo(br.toString());

            if (ans > 0) out.println(br);
            else out.println(ar);
        }

    }
} 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);
        BComparingStrings solver = new BComparingStrings();
        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);
        BComparingStrings solver = new BComparingStrings();
        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) BComparingStrings solver = new BComparingStrings(); solver new BComparingStrings() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class BComparingStrings {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt();
            int b = in.nextInt();

            StringBuilder ar = new StringBuilder();
            StringBuilder br = new StringBuilder();

            for (int i = 0; i < b; i++) {
                ar.append(a);
            }

            for (int j = 0; j < a; j++) {
                br.append(b);
            }

            int ans = ar.toString().compareTo(br.toString());

            if (ans > 0) out.println(br);
            else out.println(ar);
        }

    } BComparingStrings public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt();
            int b = in.nextInt();

            StringBuilder ar = new StringBuilder();
            StringBuilder br = new StringBuilder();

            for (int i = 0; i < b; i++) {
                ar.append(a);
            }

            for (int j = 0; j < a; j++) {
                br.append(b);
            }

            int ans = ar.toString().compareTo(br.toString());

            if (ans > 0) out.println(br);
            else out.println(ar);
        } solve {
            int a = in.nextInt();
            int b = in.nextInt();

            StringBuilder ar = new StringBuilder();
            StringBuilder br = new StringBuilder();

            for (int i = 0; i < b; i++) {
                ar.append(a);
            }

            for (int j = 0; j < a; j++) {
                br.append(b);
            }

            int ans = ar.toString().compareTo(br.toString());

            if (ans > 0) out.println(br);
            else out.println(ar);
        } int a = in.nextInt(); a in.nextInt() in.nextInt in int b = in.nextInt(); b in.nextInt() in.nextInt in StringBuilder ar = new StringBuilder(); ar new StringBuilder() StringBuilder br = new StringBuilder(); br new StringBuilder() for (int i = 0; i < b; i++) {
                ar.append(a);
            } int i = 0; int i = 0; i 0 i < b i b i++ i++ i {
                ar.append(a);
            } {
                ar.append(a);
            } ar.append(a) ar.append ar a for (int j = 0; j < a; j++) {
                br.append(b);
            } int j = 0; int j = 0; j 0 j < a j a j++ j++ j {
                br.append(b);
            } {
                br.append(b);
            } br.append(b) br.append br b int ans = ar.toString().compareTo(br.toString()); ans ar.toString().compareTo(br.toString()) ar.toString().compareTo ar.toString() ar.toString ar br.toString() br.toString br if (ans > 0) out.println(br);
            else out.println(ar); ans > 0 ans 0 out.println(br) out.println out br out.println(ar) out.println out ar 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);
        BComparingStrings solver = new BComparingStrings();
        solver.solve(1, in, out);
        out.close();
    }

    static class BComparingStrings {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt();
            int b = in.nextInt();

            StringBuilder ar = new StringBuilder();
            StringBuilder br = new StringBuilder();

            for (int i = 0; i < b; i++) {
                ar.append(a);
            }

            for (int j = 0; j < a; j++) {
                br.append(b);
            }

            int ans = ar.toString().compareTo(br.toString());

            if (ans > 0) out.println(br);
            else out.println(ar);
        }

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

    static class BComparingStrings {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt();
            int b = in.nextInt();

            StringBuilder ar = new StringBuilder();
            StringBuilder br = new StringBuilder();

            for (int i = 0; i < b; i++) {
                ar.append(a);
            }

            for (int j = 0; j < a; j++) {
                br.append(b);
            }

            int ans = ar.toString().compareTo(br.toString());

            if (ans > 0) out.println(br);
            else out.println(ar);
        }

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

    static class BComparingStrings {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt();
            int b = in.nextInt();

            StringBuilder ar = new StringBuilder();
            StringBuilder br = new StringBuilder();

            for (int i = 0; i < b; i++) {
                ar.append(a);
            }

            for (int j = 0; j < a; j++) {
                br.append(b);
            }

            int ans = ar.toString().compareTo(br.toString());

            if (ans > 0) out.println(br);
            else out.println(ar);
        }

    }
}

