import java.util.Scanner;
import java.util.TreeSet;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String line = scanner.nextLine();
        while (line.equals("")) {
            line = scanner.nextLine();
        }
        String[] lines = line.split(" ");
        int N = Integer.parseInt(lines[0]);
        int M = Integer.parseInt(lines[1]);
        StringBuilder stringBuilder = new StringBuilder();
        for (int i = 0; i < M; i++) {
            stringBuilder.append(N);
        }
        TreeSet<String> treeSet = new TreeSet<>();
        treeSet.add(stringBuilder.toString());
        StringBuilder stringBuilder1 = new StringBuilder();
        for (int i = 0; i < N; i++) {
            stringBuilder1.append(M);
        }
        treeSet.add(stringBuilder1.toString());
        System.out.println(treeSet.first());
    }

} import java.util.Scanner; Scanner java.util import java.util.TreeSet; TreeSet java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String line = scanner.nextLine();
        while (line.equals("")) {
            line = scanner.nextLine();
        }
        String[] lines = line.split(" ");
        int N = Integer.parseInt(lines[0]);
        int M = Integer.parseInt(lines[1]);
        StringBuilder stringBuilder = new StringBuilder();
        for (int i = 0; i < M; i++) {
            stringBuilder.append(N);
        }
        TreeSet<String> treeSet = new TreeSet<>();
        treeSet.add(stringBuilder.toString());
        StringBuilder stringBuilder1 = new StringBuilder();
        for (int i = 0; i < N; i++) {
            stringBuilder1.append(M);
        }
        treeSet.add(stringBuilder1.toString());
        System.out.println(treeSet.first());
    }

} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String line = scanner.nextLine();
        while (line.equals("")) {
            line = scanner.nextLine();
        }
        String[] lines = line.split(" ");
        int N = Integer.parseInt(lines[0]);
        int M = Integer.parseInt(lines[1]);
        StringBuilder stringBuilder = new StringBuilder();
        for (int i = 0; i < M; i++) {
            stringBuilder.append(N);
        }
        TreeSet<String> treeSet = new TreeSet<>();
        treeSet.add(stringBuilder.toString());
        StringBuilder stringBuilder1 = new StringBuilder();
        for (int i = 0; i < N; i++) {
            stringBuilder1.append(M);
        }
        treeSet.add(stringBuilder1.toString());
        System.out.println(treeSet.first());
    } main {
        Scanner scanner = new Scanner(System.in);
        String line = scanner.nextLine();
        while (line.equals("")) {
            line = scanner.nextLine();
        }
        String[] lines = line.split(" ");
        int N = Integer.parseInt(lines[0]);
        int M = Integer.parseInt(lines[1]);
        StringBuilder stringBuilder = new StringBuilder();
        for (int i = 0; i < M; i++) {
            stringBuilder.append(N);
        }
        TreeSet<String> treeSet = new TreeSet<>();
        treeSet.add(stringBuilder.toString());
        StringBuilder stringBuilder1 = new StringBuilder();
        for (int i = 0; i < N; i++) {
            stringBuilder1.append(M);
        }
        treeSet.add(stringBuilder1.toString());
        System.out.println(treeSet.first());
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String line = scanner.nextLine(); line scanner.nextLine() scanner.nextLine scanner while (line.equals("")) {
            line = scanner.nextLine();
        } line.equals("") line.equals line "" {
            line = scanner.nextLine();
        } line = scanner.nextLine() line scanner.nextLine() scanner.nextLine scanner String[] lines = line.split(" "); lines line.split(" ") line.split line " " int N = Integer.parseInt(lines[0]); N Integer.parseInt(lines[0]) Integer.parseInt Integer lines[0] lines 0 int M = Integer.parseInt(lines[1]); M Integer.parseInt(lines[1]) Integer.parseInt Integer lines[1] lines 1 StringBuilder stringBuilder = new StringBuilder(); stringBuilder new StringBuilder() for (int i = 0; i < M; i++) {
            stringBuilder.append(N);
        } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
            stringBuilder.append(N);
        } {
            stringBuilder.append(N);
        } stringBuilder.append(N) stringBuilder.append stringBuilder N TreeSet<String> treeSet = new TreeSet<>(); treeSet new TreeSet<>() treeSet.add(stringBuilder.toString()) treeSet.add treeSet stringBuilder.toString() stringBuilder.toString stringBuilder StringBuilder stringBuilder1 = new StringBuilder(); stringBuilder1 new StringBuilder() for (int i = 0; i < N; i++) {
            stringBuilder1.append(M);
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            stringBuilder1.append(M);
        } {
            stringBuilder1.append(M);
        } stringBuilder1.append(M) stringBuilder1.append stringBuilder1 M treeSet.add(stringBuilder1.toString()) treeSet.add treeSet stringBuilder1.toString() stringBuilder1.toString stringBuilder1 System.out.println(treeSet.first()) System.out.println System.out System System.out treeSet.first() treeSet.first treeSet String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String line = scanner.nextLine();
        while (line.equals("")) {
            line = scanner.nextLine();
        }
        String[] lines = line.split(" ");
        int N = Integer.parseInt(lines[0]);
        int M = Integer.parseInt(lines[1]);
        StringBuilder stringBuilder = new StringBuilder();
        for (int i = 0; i < M; i++) {
            stringBuilder.append(N);
        }
        TreeSet<String> treeSet = new TreeSet<>();
        treeSet.add(stringBuilder.toString());
        StringBuilder stringBuilder1 = new StringBuilder();
        for (int i = 0; i < N; i++) {
            stringBuilder1.append(M);
        }
        treeSet.add(stringBuilder1.toString());
        System.out.println(treeSet.first());
    }

} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String line = scanner.nextLine();
        while (line.equals("")) {
            line = scanner.nextLine();
        }
        String[] lines = line.split(" ");
        int N = Integer.parseInt(lines[0]);
        int M = Integer.parseInt(lines[1]);
        StringBuilder stringBuilder = new StringBuilder();
        for (int i = 0; i < M; i++) {
            stringBuilder.append(N);
        }
        TreeSet<String> treeSet = new TreeSet<>();
        treeSet.add(stringBuilder.toString());
        StringBuilder stringBuilder1 = new StringBuilder();
        for (int i = 0; i < N; i++) {
            stringBuilder1.append(M);
        }
        treeSet.add(stringBuilder1.toString());
        System.out.println(treeSet.first());
    }

} Main
import java.util.Scanner;
import java.util.TreeSet;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String line = scanner.nextLine();
        while (line.equals("")) {
            line = scanner.nextLine();
        }
        String[] lines = line.split(" ");
        int N = Integer.parseInt(lines[0]);
        int M = Integer.parseInt(lines[1]);
        StringBuilder stringBuilder = new StringBuilder();
        for (int i = 0; i < M; i++) {
            stringBuilder.append(N);
        }
        TreeSet<String> treeSet = new TreeSet<>();
        treeSet.add(stringBuilder.toString());
        StringBuilder stringBuilder1 = new StringBuilder();
        for (int i = 0; i < N; i++) {
            stringBuilder1.append(M);
        }
        treeSet.add(stringBuilder1.toString());
        System.out.println(treeSet.first());
    }

}