import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();

        String[] substr = str.split(" ", 0);

        int a = Integer.parseInt(substr[0]);
        int b = Integer.parseInt(substr[1]);

        String result = "";
        int n = 0;
        if (a >= b) {
        	result = substr[1];
        	n = a;
        } else {
        	result = substr[0];
        	n = b;
        }
    	StringBuilder buff = new StringBuilder();
        for (int i=0; i<n; i++) {
        	buff.append(result);
        }
        System.out.println(buff.toString());

        scan.close();

    }

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

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();

        String[] substr = str.split(" ", 0);

        int a = Integer.parseInt(substr[0]);
        int b = Integer.parseInt(substr[1]);

        String result = "";
        int n = 0;
        if (a >= b) {
        	result = substr[1];
        	n = a;
        } else {
        	result = substr[0];
        	n = b;
        }
    	StringBuilder buff = new StringBuilder();
        for (int i=0; i<n; i++) {
        	buff.append(result);
        }
        System.out.println(buff.toString());

        scan.close();

    }

} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();

        String[] substr = str.split(" ", 0);

        int a = Integer.parseInt(substr[0]);
        int b = Integer.parseInt(substr[1]);

        String result = "";
        int n = 0;
        if (a >= b) {
        	result = substr[1];
        	n = a;
        } else {
        	result = substr[0];
        	n = b;
        }
    	StringBuilder buff = new StringBuilder();
        for (int i=0; i<n; i++) {
        	buff.append(result);
        }
        System.out.println(buff.toString());

        scan.close();

    } main {
        Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();

        String[] substr = str.split(" ", 0);

        int a = Integer.parseInt(substr[0]);
        int b = Integer.parseInt(substr[1]);

        String result = "";
        int n = 0;
        if (a >= b) {
        	result = substr[1];
        	n = a;
        } else {
        	result = substr[0];
        	n = b;
        }
    	StringBuilder buff = new StringBuilder();
        for (int i=0; i<n; i++) {
        	buff.append(result);
        }
        System.out.println(buff.toString());

        scan.close();

    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String str = scan.nextLine(); str scan.nextLine() scan.nextLine scan String[] substr = str.split(" ", 0); substr str.split(" ", 0) str.split str " " 0 int a = Integer.parseInt(substr[0]); a Integer.parseInt(substr[0]) Integer.parseInt Integer substr[0] substr 0 int b = Integer.parseInt(substr[1]); b Integer.parseInt(substr[1]) Integer.parseInt Integer substr[1] substr 1 String result = ""; result "" int n = 0; n 0 if (a >= b) {
        	result = substr[1];
        	n = a;
        } else {
        	result = substr[0];
        	n = b;
        } a >= b a b {
        	result = substr[1];
        	n = a;
        } result = substr[1] result substr[1] substr 1 n = a n a {
        	result = substr[0];
        	n = b;
        } result = substr[0] result substr[0] substr 0 n = b n b StringBuilder buff = new StringBuilder(); buff new StringBuilder() for (int i=0; i<n; i++) {
        	buff.append(result);
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
        	buff.append(result);
        } {
        	buff.append(result);
        } buff.append(result) buff.append buff result System.out.println(buff.toString()) System.out.println System.out System System.out buff.toString() buff.toString buff scan.close() scan.close scan String[] args args public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();

        String[] substr = str.split(" ", 0);

        int a = Integer.parseInt(substr[0]);
        int b = Integer.parseInt(substr[1]);

        String result = "";
        int n = 0;
        if (a >= b) {
        	result = substr[1];
        	n = a;
        } else {
        	result = substr[0];
        	n = b;
        }
    	StringBuilder buff = new StringBuilder();
        for (int i=0; i<n; i++) {
        	buff.append(result);
        }
        System.out.println(buff.toString());

        scan.close();

    }

} public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();

        String[] substr = str.split(" ", 0);

        int a = Integer.parseInt(substr[0]);
        int b = Integer.parseInt(substr[1]);

        String result = "";
        int n = 0;
        if (a >= b) {
        	result = substr[1];
        	n = a;
        } else {
        	result = substr[0];
        	n = b;
        }
    	StringBuilder buff = new StringBuilder();
        for (int i=0; i<n; i++) {
        	buff.append(result);
        }
        System.out.println(buff.toString());

        scan.close();

    }

} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();

        String[] substr = str.split(" ", 0);

        int a = Integer.parseInt(substr[0]);
        int b = Integer.parseInt(substr[1]);

        String result = "";
        int n = 0;
        if (a >= b) {
        	result = substr[1];
        	n = a;
        } else {
        	result = substr[0];
        	n = b;
        }
    	StringBuilder buff = new StringBuilder();
        for (int i=0; i<n; i++) {
        	buff.append(result);
        }
        System.out.println(buff.toString());

        scan.close();

    }

}