import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {
	
	public static void main(String args[]) throws IOException {
		
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String[] parts;
		
		parts = br.readLine().split(" ");
		
		int a = Integer.parseInt(parts[0]);
		int b = Integer.parseInt(parts[1]);
		
		String s1 ="";
		for (int i = 0; i<a; i++) {
			s1+=parts[1];
		}
		
		String s2="";
		for (int i = 0; i<b; i++) {
			s2+=parts[0];
		}
		if(s1.compareTo(s2)<0) {
			System.out.println(s1);
			
		}else{
			System.out.println(s2);
		}
	}
	
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Arrays; Arrays java.util public class Main {
	
	public static void main(String args[]) throws IOException {
		
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String[] parts;
		
		parts = br.readLine().split(" ");
		
		int a = Integer.parseInt(parts[0]);
		int b = Integer.parseInt(parts[1]);
		
		String s1 ="";
		for (int i = 0; i<a; i++) {
			s1+=parts[1];
		}
		
		String s2="";
		for (int i = 0; i<b; i++) {
			s2+=parts[0];
		}
		if(s1.compareTo(s2)<0) {
			System.out.println(s1);
			
		}else{
			System.out.println(s2);
		}
	}
	
} Main public static void main(String args[]) throws IOException {
		
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String[] parts;
		
		parts = br.readLine().split(" ");
		
		int a = Integer.parseInt(parts[0]);
		int b = Integer.parseInt(parts[1]);
		
		String s1 ="";
		for (int i = 0; i<a; i++) {
			s1+=parts[1];
		}
		
		String s2="";
		for (int i = 0; i<b; i++) {
			s2+=parts[0];
		}
		if(s1.compareTo(s2)<0) {
			System.out.println(s1);
			
		}else{
			System.out.println(s2);
		}
	} main {
		
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String[] parts;
		
		parts = br.readLine().split(" ");
		
		int a = Integer.parseInt(parts[0]);
		int b = Integer.parseInt(parts[1]);
		
		String s1 ="";
		for (int i = 0; i<a; i++) {
			s1+=parts[1];
		}
		
		String s2="";
		for (int i = 0; i<b; i++) {
			s2+=parts[0];
		}
		if(s1.compareTo(s2)<0) {
			System.out.println(s1);
			
		}else{
			System.out.println(s2);
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] parts; parts parts = br.readLine().split(" ") parts br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int a = Integer.parseInt(parts[0]); a Integer.parseInt(parts[0]) Integer.parseInt Integer parts[0] parts 0 int b = Integer.parseInt(parts[1]); b Integer.parseInt(parts[1]) Integer.parseInt Integer parts[1] parts 1 String s1 =""; s1 "" for (int i = 0; i<a; i++) {
			s1+=parts[1];
		} int i = 0; int i = 0; i 0 i<a i a i++ i++ i {
			s1+=parts[1];
		} {
			s1+=parts[1];
		} s1+=parts[1] s1 parts[1] parts 1 String s2=""; s2 "" for (int i = 0; i<b; i++) {
			s2+=parts[0];
		} int i = 0; int i = 0; i 0 i<b i b i++ i++ i {
			s2+=parts[0];
		} {
			s2+=parts[0];
		} s2+=parts[0] s2 parts[0] parts 0 if(s1.compareTo(s2)<0) {
			System.out.println(s1);
			
		}else{
			System.out.println(s2);
		} s1.compareTo(s2)<0 s1.compareTo(s2) s1.compareTo s1 s2 0 {
			System.out.println(s1);
			
		} System.out.println(s1) System.out.println System.out System System.out s1 {
			System.out.println(s2);
		} System.out.println(s2) System.out.println System.out System System.out s2 String args[] args public class Main {
	
	public static void main(String args[]) throws IOException {
		
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String[] parts;
		
		parts = br.readLine().split(" ");
		
		int a = Integer.parseInt(parts[0]);
		int b = Integer.parseInt(parts[1]);
		
		String s1 ="";
		for (int i = 0; i<a; i++) {
			s1+=parts[1];
		}
		
		String s2="";
		for (int i = 0; i<b; i++) {
			s2+=parts[0];
		}
		if(s1.compareTo(s2)<0) {
			System.out.println(s1);
			
		}else{
			System.out.println(s2);
		}
	}
	
} public class Main {
	
	public static void main(String args[]) throws IOException {
		
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String[] parts;
		
		parts = br.readLine().split(" ");
		
		int a = Integer.parseInt(parts[0]);
		int b = Integer.parseInt(parts[1]);
		
		String s1 ="";
		for (int i = 0; i<a; i++) {
			s1+=parts[1];
		}
		
		String s2="";
		for (int i = 0; i<b; i++) {
			s2+=parts[0];
		}
		if(s1.compareTo(s2)<0) {
			System.out.println(s1);
			
		}else{
			System.out.println(s2);
		}
	}
	
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {
	
	public static void main(String args[]) throws IOException {
		
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String[] parts;
		
		parts = br.readLine().split(" ");
		
		int a = Integer.parseInt(parts[0]);
		int b = Integer.parseInt(parts[1]);
		
		String s1 ="";
		for (int i = 0; i<a; i++) {
			s1+=parts[1];
		}
		
		String s2="";
		for (int i = 0; i<b; i++) {
			s2+=parts[0];
		}
		if(s1.compareTo(s2)<0) {
			System.out.println(s1);
			
		}else{
			System.out.println(s2);
		}
	}
	
}
