
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();

        StringBuilder s1 = new StringBuilder();
        StringBuilder s2 = new StringBuilder();
        for(int i=0; i<b; i++) {
            s1.append(a);
        }
        for(int i=0; i<a; i++) {
            s2.append(b);
        }

        if(s1.toString().compareTo(s2.toString()) < 0) {
            System.out.println(s1.toString());
        } else {
            System.out.println(s2.toString());
        }

    }
} 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();

        StringBuilder s1 = new StringBuilder();
        StringBuilder s2 = new StringBuilder();
        for(int i=0; i<b; i++) {
            s1.append(a);
        }
        for(int i=0; i<a; i++) {
            s2.append(b);
        }

        if(s1.toString().compareTo(s2.toString()) < 0) {
            System.out.println(s1.toString());
        } else {
            System.out.println(s2.toString());
        }

    }
} Main public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();

        StringBuilder s1 = new StringBuilder();
        StringBuilder s2 = new StringBuilder();
        for(int i=0; i<b; i++) {
            s1.append(a);
        }
        for(int i=0; i<a; i++) {
            s2.append(b);
        }

        if(s1.toString().compareTo(s2.toString()) < 0) {
            System.out.println(s1.toString());
        } else {
            System.out.println(s2.toString());
        }

    } main {

        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();

        StringBuilder s1 = new StringBuilder();
        StringBuilder s2 = new StringBuilder();
        for(int i=0; i<b; i++) {
            s1.append(a);
        }
        for(int i=0; i<a; i++) {
            s2.append(b);
        }

        if(s1.toString().compareTo(s2.toString()) < 0) {
            System.out.println(s1.toString());
        } else {
            System.out.println(s2.toString());
        }

    } 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 StringBuilder s1 = new StringBuilder(); s1 new StringBuilder() StringBuilder s2 = new StringBuilder(); s2 new StringBuilder() for(int i=0; i<b; i++) {
            s1.append(a);
        } int i=0; int i=0; i 0 i<b i b i++ i++ i {
            s1.append(a);
        } {
            s1.append(a);
        } s1.append(a) s1.append s1 a for(int i=0; i<a; i++) {
            s2.append(b);
        } int i=0; int i=0; i 0 i<a i a i++ i++ i {
            s2.append(b);
        } {
            s2.append(b);
        } s2.append(b) s2.append s2 b if(s1.toString().compareTo(s2.toString()) < 0) {
            System.out.println(s1.toString());
        } else {
            System.out.println(s2.toString());
        } s1.toString().compareTo(s2.toString()) < 0 s1.toString().compareTo(s2.toString()) s1.toString().compareTo s1.toString() s1.toString s1 s2.toString() s2.toString s2 0 {
            System.out.println(s1.toString());
        } System.out.println(s1.toString()) System.out.println System.out System System.out s1.toString() s1.toString s1 {
            System.out.println(s2.toString());
        } System.out.println(s2.toString()) System.out.println System.out System System.out s2.toString() s2.toString s2 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();

        StringBuilder s1 = new StringBuilder();
        StringBuilder s2 = new StringBuilder();
        for(int i=0; i<b; i++) {
            s1.append(a);
        }
        for(int i=0; i<a; i++) {
            s2.append(b);
        }

        if(s1.toString().compareTo(s2.toString()) < 0) {
            System.out.println(s1.toString());
        } else {
            System.out.println(s2.toString());
        }

    }
} public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();

        StringBuilder s1 = new StringBuilder();
        StringBuilder s2 = new StringBuilder();
        for(int i=0; i<b; i++) {
            s1.append(a);
        }
        for(int i=0; i<a; i++) {
            s2.append(b);
        }

        if(s1.toString().compareTo(s2.toString()) < 0) {
            System.out.println(s1.toString());
        } else {
            System.out.println(s2.toString());
        }

    }
} 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();

        StringBuilder s1 = new StringBuilder();
        StringBuilder s2 = new StringBuilder();
        for(int i=0; i<b; i++) {
            s1.append(a);
        }
        for(int i=0; i<a; i++) {
            s2.append(b);
        }

        if(s1.toString().compareTo(s2.toString()) < 0) {
            System.out.println(s1.toString());
        } else {
            System.out.println(s2.toString());
        }

    }
}
