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

    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int a = sc.nextInt();
        // スペース区切りの整数の入力
        int b = sc.nextInt();
        StringBuilder ab = new StringBuilder();
        StringBuilder ba = new StringBuilder();
        for(int i=0;i<a;i++){
            ab.append(b);
        }
        for(int i=0;i<b;i++){
            ba.append(a);
        }
        String abs = ab.toString();
        String bas = ba.toString();
        if(abs.compareTo(bas) < 0){
            System.out.println(abs);
        }else{
            System.out.println(bas);
        }

    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int a = sc.nextInt();
        // スペース区切りの整数の入力
        int b = sc.nextInt();
        StringBuilder ab = new StringBuilder();
        StringBuilder ba = new StringBuilder();
        for(int i=0;i<a;i++){
            ab.append(b);
        }
        for(int i=0;i<b;i++){
            ba.append(a);
        }
        String abs = ab.toString();
        String bas = ba.toString();
        if(abs.compareTo(bas) < 0){
            System.out.println(abs);
        }else{
            System.out.println(bas);
        }

    } main {
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int a = sc.nextInt();
        // スペース区切りの整数の入力
        int b = sc.nextInt();
        StringBuilder ab = new StringBuilder();
        StringBuilder ba = new StringBuilder();
        for(int i=0;i<a;i++){
            ab.append(b);
        }
        for(int i=0;i<b;i++){
            ba.append(a);
        }
        String abs = ab.toString();
        String bas = ba.toString();
        if(abs.compareTo(bas) < 0){
            System.out.println(abs);
        }else{
            System.out.println(bas);
        }

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

    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int a = sc.nextInt();
        // スペース区切りの整数の入力
        int b = sc.nextInt();
        StringBuilder ab = new StringBuilder();
        StringBuilder ba = new StringBuilder();
        for(int i=0;i<a;i++){
            ab.append(b);
        }
        for(int i=0;i<b;i++){
            ba.append(a);
        }
        String abs = ab.toString();
        String bas = ba.toString();
        if(abs.compareTo(bas) < 0){
            System.out.println(abs);
        }else{
            System.out.println(bas);
        }

    }
} Main
import 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 ab = new StringBuilder();
        StringBuilder ba = new StringBuilder();
        for(int i=0;i<a;i++){
            ab.append(b);
        }
        for(int i=0;i<b;i++){
            ba.append(a);
        }
        String abs = ab.toString();
        String bas = ba.toString();
        if(abs.compareTo(bas) < 0){
            System.out.println(abs);
        }else{
            System.out.println(bas);
        }

    }
}