import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] line = sc.nextLine().split(" ", 0);
		char A = line[0].charAt(0);
		char B = line[1].charAt(0);
		StringBuilder sb = new StringBuilder();
		if (A <= B) {
			for (int i = 0; i < Integer.parseInt(line[1]); i++) {
				sb.append(A);
			}
			System.out.println(sb.toString());
		} else {
			for (int i = 0; i < Integer.parseInt(line[0]); i++) {
				sb.append(B);
			}
			System.out.println(sb.toString());
		}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] line = sc.nextLine().split(" ", 0);
		char A = line[0].charAt(0);
		char B = line[1].charAt(0);
		StringBuilder sb = new StringBuilder();
		if (A <= B) {
			for (int i = 0; i < Integer.parseInt(line[1]); i++) {
				sb.append(A);
			}
			System.out.println(sb.toString());
		} else {
			for (int i = 0; i < Integer.parseInt(line[0]); i++) {
				sb.append(B);
			}
			System.out.println(sb.toString());
		}

	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] line = sc.nextLine().split(" ", 0);
		char A = line[0].charAt(0);
		char B = line[1].charAt(0);
		StringBuilder sb = new StringBuilder();
		if (A <= B) {
			for (int i = 0; i < Integer.parseInt(line[1]); i++) {
				sb.append(A);
			}
			System.out.println(sb.toString());
		} else {
			for (int i = 0; i < Integer.parseInt(line[0]); i++) {
				sb.append(B);
			}
			System.out.println(sb.toString());
		}

	} main {
		Scanner sc = new Scanner(System.in);
		String[] line = sc.nextLine().split(" ", 0);
		char A = line[0].charAt(0);
		char B = line[1].charAt(0);
		StringBuilder sb = new StringBuilder();
		if (A <= B) {
			for (int i = 0; i < Integer.parseInt(line[1]); i++) {
				sb.append(A);
			}
			System.out.println(sb.toString());
		} else {
			for (int i = 0; i < Integer.parseInt(line[0]); i++) {
				sb.append(B);
			}
			System.out.println(sb.toString());
		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] line = sc.nextLine().split(" ", 0); line sc.nextLine().split(" ", 0) sc.nextLine().split sc.nextLine() sc.nextLine sc " " 0 char A = line[0].charAt(0); A line[0].charAt(0) line[0].charAt line[0] line 0 0 char B = line[1].charAt(0); B line[1].charAt(0) line[1].charAt line[1] line 1 0 StringBuilder sb = new StringBuilder(); sb new StringBuilder() if (A <= B) {
			for (int i = 0; i < Integer.parseInt(line[1]); i++) {
				sb.append(A);
			}
			System.out.println(sb.toString());
		} else {
			for (int i = 0; i < Integer.parseInt(line[0]); i++) {
				sb.append(B);
			}
			System.out.println(sb.toString());
		} A <= B A B {
			for (int i = 0; i < Integer.parseInt(line[1]); i++) {
				sb.append(A);
			}
			System.out.println(sb.toString());
		} for (int i = 0; i < Integer.parseInt(line[1]); i++) {
				sb.append(A);
			} int i = 0; int i = 0; i 0 i < Integer.parseInt(line[1]) i Integer.parseInt(line[1]) Integer.parseInt Integer line[1] line 1 i++ i++ i {
				sb.append(A);
			} {
				sb.append(A);
			} sb.append(A) sb.append sb A System.out.println(sb.toString()) System.out.println System.out System System.out sb.toString() sb.toString sb {
			for (int i = 0; i < Integer.parseInt(line[0]); i++) {
				sb.append(B);
			}
			System.out.println(sb.toString());
		} for (int i = 0; i < Integer.parseInt(line[0]); i++) {
				sb.append(B);
			} int i = 0; int i = 0; i 0 i < Integer.parseInt(line[0]) i Integer.parseInt(line[0]) Integer.parseInt Integer line[0] line 0 i++ i++ i {
				sb.append(B);
			} {
				sb.append(B);
			} sb.append(B) sb.append sb B System.out.println(sb.toString()) System.out.println System.out System System.out sb.toString() sb.toString sb String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] line = sc.nextLine().split(" ", 0);
		char A = line[0].charAt(0);
		char B = line[1].charAt(0);
		StringBuilder sb = new StringBuilder();
		if (A <= B) {
			for (int i = 0; i < Integer.parseInt(line[1]); i++) {
				sb.append(A);
			}
			System.out.println(sb.toString());
		} else {
			for (int i = 0; i < Integer.parseInt(line[0]); i++) {
				sb.append(B);
			}
			System.out.println(sb.toString());
		}

	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] line = sc.nextLine().split(" ", 0);
		char A = line[0].charAt(0);
		char B = line[1].charAt(0);
		StringBuilder sb = new StringBuilder();
		if (A <= B) {
			for (int i = 0; i < Integer.parseInt(line[1]); i++) {
				sb.append(A);
			}
			System.out.println(sb.toString());
		} else {
			for (int i = 0; i < Integer.parseInt(line[0]); i++) {
				sb.append(B);
			}
			System.out.println(sb.toString());
		}

	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] line = sc.nextLine().split(" ", 0);
		char A = line[0].charAt(0);
		char B = line[1].charAt(0);
		StringBuilder sb = new StringBuilder();
		if (A <= B) {
			for (int i = 0; i < Integer.parseInt(line[1]); i++) {
				sb.append(A);
			}
			System.out.println(sb.toString());
		} else {
			for (int i = 0; i < Integer.parseInt(line[0]); i++) {
				sb.append(B);
			}
			System.out.println(sb.toString());
		}

	}
}