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