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 bb = new StringBuilder();

        for (int i = 0; i < b; i++) {
            ab.append(a);
        }
        for (int i = 0; i < a; i++) {
            bb.append(b);
        }
        String as = ab.toString();
        String bs = bb.toString();

        if (as.compareTo(bs) <= 0) {
            System.out.println(as);
        }
        else {
            System.out.println(bs);
        }
    }
} 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 bb = new StringBuilder();

        for (int i = 0; i < b; i++) {
            ab.append(a);
        }
        for (int i = 0; i < a; i++) {
            bb.append(b);
        }
        String as = ab.toString();
        String bs = bb.toString();

        if (as.compareTo(bs) <= 0) {
            System.out.println(as);
        }
        else {
            System.out.println(bs);
        }
    }
} 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 bb = new StringBuilder();

        for (int i = 0; i < b; i++) {
            ab.append(a);
        }
        for (int i = 0; i < a; i++) {
            bb.append(b);
        }
        String as = ab.toString();
        String bs = bb.toString();

        if (as.compareTo(bs) <= 0) {
            System.out.println(as);
        }
        else {
            System.out.println(bs);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        StringBuilder ab = new StringBuilder();
        StringBuilder bb = new StringBuilder();

        for (int i = 0; i < b; i++) {
            ab.append(a);
        }
        for (int i = 0; i < a; i++) {
            bb.append(b);
        }
        String as = ab.toString();
        String bs = bb.toString();

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

        for (int i = 0; i < b; i++) {
            ab.append(a);
        }
        for (int i = 0; i < a; i++) {
            bb.append(b);
        }
        String as = ab.toString();
        String bs = bb.toString();

        if (as.compareTo(bs) <= 0) {
            System.out.println(as);
        }
        else {
            System.out.println(bs);
        }
    }
} 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 bb = new StringBuilder();

        for (int i = 0; i < b; i++) {
            ab.append(a);
        }
        for (int i = 0; i < a; i++) {
            bb.append(b);
        }
        String as = ab.toString();
        String bs = bb.toString();

        if (as.compareTo(bs) <= 0) {
            System.out.println(as);
        }
        else {
            System.out.println(bs);
        }
    }
} 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 bb = new StringBuilder();

        for (int i = 0; i < b; i++) {
            ab.append(a);
        }
        for (int i = 0; i < a; i++) {
            bb.append(b);
        }
        String as = ab.toString();
        String bs = bb.toString();

        if (as.compareTo(bs) <= 0) {
            System.out.println(as);
        }
        else {
            System.out.println(bs);
        }
    }
}
