import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();

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

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

        if (sbA.toString().compareTo(sbB.toString()) >= 0) {
            System.out.println(sbB);
        } else {
            System.out.println(sbA);
        }
    }

} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();

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

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

        if (sbA.toString().compareTo(sbB.toString()) >= 0) {
            System.out.println(sbB);
        } else {
            System.out.println(sbA);
        }
    }

} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();

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

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

        if (sbA.toString().compareTo(sbB.toString()) >= 0) {
            System.out.println(sbB);
        } else {
            System.out.println(sbA);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();

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

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

        if (sbA.toString().compareTo(sbB.toString()) >= 0) {
            System.out.println(sbB);
        } else {
            System.out.println(sbA);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc StringBuffer sbA = new StringBuffer(); sbA new StringBuffer() for (int i = 0; i < a; i++) {
            sbA.append(b);
        } int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
            sbA.append(b);
        } {
            sbA.append(b);
        } sbA.append(b) sbA.append sbA b StringBuffer sbB = new StringBuffer(); sbB new StringBuffer() for (int j = 0; j < b; j++) {
            sbB.append(a);
        } int j = 0; int j = 0; j 0 j < b j b j++ j++ j {
            sbB.append(a);
        } {
            sbB.append(a);
        } sbB.append(a) sbB.append sbB a if (sbA.toString().compareTo(sbB.toString()) >= 0) {
            System.out.println(sbB);
        } else {
            System.out.println(sbA);
        } 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 {
            System.out.println(sbB);
        } System.out.println(sbB) System.out.println System.out System System.out sbB {
            System.out.println(sbA);
        } System.out.println(sbA) System.out.println System.out System System.out sbA String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();

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

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

        if (sbA.toString().compareTo(sbB.toString()) >= 0) {
            System.out.println(sbB);
        } else {
            System.out.println(sbA);
        }
    }

} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();

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

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

        if (sbA.toString().compareTo(sbB.toString()) >= 0) {
            System.out.println(sbB);
        } else {
            System.out.println(sbA);
        }
    }

} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();

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

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

        if (sbA.toString().compareTo(sbB.toString()) >= 0) {
            System.out.println(sbB);
        } else {
            System.out.println(sbA);
        }
    }

}
