import java.util.Scanner;

/**
 * Main
 */
public class Main {

    public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);
        // 整数の入力
        final int A = sc.nextInt();
        final int B = sc.nextInt();
        String mojiA = "";
        String mojiB = "";

        for(int i = 0; i < A; i++){
            mojiB = mojiB + String.valueOf(B);
        }
        for(int i = 0; i < B; i++){
            mojiA = mojiA + String.valueOf(A);
        }

        if(mojiA.compareTo(mojiB) < 0){
            System.out.println(mojiA);
        }else{
            System.out.println(mojiB);
        }
        
        sc.close();

    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);
        // 整数の入力
        final int A = sc.nextInt();
        final int B = sc.nextInt();
        String mojiA = "";
        String mojiB = "";

        for(int i = 0; i < A; i++){
            mojiB = mojiB + String.valueOf(B);
        }
        for(int i = 0; i < B; i++){
            mojiA = mojiA + String.valueOf(A);
        }

        if(mojiA.compareTo(mojiB) < 0){
            System.out.println(mojiA);
        }else{
            System.out.println(mojiB);
        }
        
        sc.close();

    }
} Main public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);
        // 整数の入力
        final int A = sc.nextInt();
        final int B = sc.nextInt();
        String mojiA = "";
        String mojiB = "";

        for(int i = 0; i < A; i++){
            mojiB = mojiB + String.valueOf(B);
        }
        for(int i = 0; i < B; i++){
            mojiA = mojiA + String.valueOf(A);
        }

        if(mojiA.compareTo(mojiB) < 0){
            System.out.println(mojiA);
        }else{
            System.out.println(mojiB);
        }
        
        sc.close();

    } main {
        final Scanner sc = new Scanner(System.in);
        // 整数の入力
        final int A = sc.nextInt();
        final int B = sc.nextInt();
        String mojiA = "";
        String mojiB = "";

        for(int i = 0; i < A; i++){
            mojiB = mojiB + String.valueOf(B);
        }
        for(int i = 0; i < B; i++){
            mojiA = mojiA + String.valueOf(A);
        }

        if(mojiA.compareTo(mojiB) < 0){
            System.out.println(mojiA);
        }else{
            System.out.println(mojiB);
        }
        
        sc.close();

    } final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc final int B = sc.nextInt(); B sc.nextInt() sc.nextInt sc String mojiA = ""; mojiA "" String mojiB = ""; mojiB "" for(int i = 0; i < A; i++){
            mojiB = mojiB + String.valueOf(B);
        } int i = 0; int i = 0; i 0 i < A i A i++ i++ i {
            mojiB = mojiB + String.valueOf(B);
        } {
            mojiB = mojiB + String.valueOf(B);
        } mojiB = mojiB + String.valueOf(B) mojiB mojiB + String.valueOf(B) mojiB String.valueOf(B) String.valueOf String B for(int i = 0; i < B; i++){
            mojiA = mojiA + String.valueOf(A);
        } int i = 0; int i = 0; i 0 i < B i B i++ i++ i {
            mojiA = mojiA + String.valueOf(A);
        } {
            mojiA = mojiA + String.valueOf(A);
        } mojiA = mojiA + String.valueOf(A) mojiA mojiA + String.valueOf(A) mojiA String.valueOf(A) String.valueOf String A if(mojiA.compareTo(mojiB) < 0){
            System.out.println(mojiA);
        }else{
            System.out.println(mojiB);
        } mojiA.compareTo(mojiB) < 0 mojiA.compareTo(mojiB) mojiA.compareTo mojiA mojiB 0 {
            System.out.println(mojiA);
        } System.out.println(mojiA) System.out.println System.out System System.out mojiA {
            System.out.println(mojiB);
        } System.out.println(mojiB) System.out.println System.out System System.out mojiB sc.close() sc.close sc final String[] args args public class Main {

    public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);
        // 整数の入力
        final int A = sc.nextInt();
        final int B = sc.nextInt();
        String mojiA = "";
        String mojiB = "";

        for(int i = 0; i < A; i++){
            mojiB = mojiB + String.valueOf(B);
        }
        for(int i = 0; i < B; i++){
            mojiA = mojiA + String.valueOf(A);
        }

        if(mojiA.compareTo(mojiB) < 0){
            System.out.println(mojiA);
        }else{
            System.out.println(mojiB);
        }
        
        sc.close();

    }
} public class Main {

    public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);
        // 整数の入力
        final int A = sc.nextInt();
        final int B = sc.nextInt();
        String mojiA = "";
        String mojiB = "";

        for(int i = 0; i < A; i++){
            mojiB = mojiB + String.valueOf(B);
        }
        for(int i = 0; i < B; i++){
            mojiA = mojiA + String.valueOf(A);
        }

        if(mojiA.compareTo(mojiB) < 0){
            System.out.println(mojiA);
        }else{
            System.out.println(mojiB);
        }
        
        sc.close();

    }
} Main
import java.util.Scanner;

/**
 * Main
 */
public class Main {

    public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);
        // 整数の入力
        final int A = sc.nextInt();
        final int B = sc.nextInt();
        String mojiA = "";
        String mojiB = "";

        for(int i = 0; i < A; i++){
            mojiB = mojiB + String.valueOf(B);
        }
        for(int i = 0; i < B; i++){
            mojiA = mojiA + String.valueOf(A);
        }

        if(mojiA.compareTo(mojiB) < 0){
            System.out.println(mojiA);
        }else{
            System.out.println(mojiB);
        }
        
        sc.close();

    }
}