import java.util.Scanner;

/**
 * B - Comparing Strings
 * 1 桁の正整数 a ,b が与えられます。
 * 整数 a を b 回繰り返してできる文字列と 整数 b を a 回繰り返してできる文字列のうち、辞書順で小さい方を答えてください。
 */
public class Main {

    public static void main(String[] args) {

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

        if( a <= b ) {
            String stringA = String.valueOf( a );
            for( int i = 1; i < b; i++ ) {
                stringA += a;
            }
            System.out.println( stringA );
        }
        else {
            String stringB = String.valueOf( b );
            for( int i = 1; i < a; i++ ) {
                stringB += b;
            }
            System.out.println( stringB );
        }

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

        if( a <= b ) {
            String stringA = String.valueOf( a );
            for( int i = 1; i < b; i++ ) {
                stringA += a;
            }
            System.out.println( stringA );
        }
        else {
            String stringB = String.valueOf( b );
            for( int i = 1; i < a; i++ ) {
                stringB += b;
            }
            System.out.println( stringB );
        }

        sc.close();
    }
} Main public static void main(String[] args) {

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

        if( a <= b ) {
            String stringA = String.valueOf( a );
            for( int i = 1; i < b; i++ ) {
                stringA += a;
            }
            System.out.println( stringA );
        }
        else {
            String stringB = String.valueOf( b );
            for( int i = 1; i < a; i++ ) {
                stringB += b;
            }
            System.out.println( stringB );
        }

        sc.close();
    } main {

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

        if( a <= b ) {
            String stringA = String.valueOf( a );
            for( int i = 1; i < b; i++ ) {
                stringA += a;
            }
            System.out.println( stringA );
        }
        else {
            String stringB = String.valueOf( b );
            for( int i = 1; i < a; i++ ) {
                stringB += b;
            }
            System.out.println( stringB );
        }

        sc.close();
    } 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 if( a <= b ) {
            String stringA = String.valueOf( a );
            for( int i = 1; i < b; i++ ) {
                stringA += a;
            }
            System.out.println( stringA );
        }
        else {
            String stringB = String.valueOf( b );
            for( int i = 1; i < a; i++ ) {
                stringB += b;
            }
            System.out.println( stringB );
        } a <= b a b {
            String stringA = String.valueOf( a );
            for( int i = 1; i < b; i++ ) {
                stringA += a;
            }
            System.out.println( stringA );
        } String stringA = String.valueOf( a ); stringA String.valueOf( a ) String.valueOf String a for( int i = 1; i < b; i++ ) {
                stringA += a;
            } int i = 1; int i = 1; i 1 i < b i b i++ i++ i {
                stringA += a;
            } {
                stringA += a;
            } stringA += a stringA a System.out.println( stringA ) System.out.println System.out System System.out stringA {
            String stringB = String.valueOf( b );
            for( int i = 1; i < a; i++ ) {
                stringB += b;
            }
            System.out.println( stringB );
        } String stringB = String.valueOf( b ); stringB String.valueOf( b ) String.valueOf String b for( int i = 1; i < a; i++ ) {
                stringB += b;
            } int i = 1; int i = 1; i 1 i < a i a i++ i++ i {
                stringB += b;
            } {
                stringB += b;
            } stringB += b stringB b System.out.println( stringB ) System.out.println System.out System System.out stringB sc.close() sc.close sc 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();

        if( a <= b ) {
            String stringA = String.valueOf( a );
            for( int i = 1; i < b; i++ ) {
                stringA += a;
            }
            System.out.println( stringA );
        }
        else {
            String stringB = String.valueOf( b );
            for( int i = 1; i < a; i++ ) {
                stringB += b;
            }
            System.out.println( stringB );
        }

        sc.close();
    }
} public class Main {

    public static void main(String[] args) {

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

        if( a <= b ) {
            String stringA = String.valueOf( a );
            for( int i = 1; i < b; i++ ) {
                stringA += a;
            }
            System.out.println( stringA );
        }
        else {
            String stringB = String.valueOf( b );
            for( int i = 1; i < a; i++ ) {
                stringB += b;
            }
            System.out.println( stringB );
        }

        sc.close();
    }
} Main
import java.util.Scanner;

/**
 * B - Comparing Strings
 * 1 桁の正整数 a ,b が与えられます。
 * 整数 a を b 回繰り返してできる文字列と 整数 b を a 回繰り返してできる文字列のうち、辞書順で小さい方を答えてください。
 */
public class Main {

    public static void main(String[] args) {

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

        if( a <= b ) {
            String stringA = String.valueOf( a );
            for( int i = 1; i < b; i++ ) {
                stringA += a;
            }
            System.out.println( stringA );
        }
        else {
            String stringB = String.valueOf( b );
            for( int i = 1; i < a; i++ ) {
                stringB += b;
            }
            System.out.println( stringB );
        }

        sc.close();
    }
}