import java.math.*;
import java.util.*;
	
	public class Main {
	
		public static void main(String[] args) {
		
			Scanner sc = new Scanner(System.in);
			String a = sc.next();
			String b = sc.next();
			int an =Integer.parseInt(a);
			int bn =Integer.parseInt(b);
			
			
			String ab ="" ;
			String ba =""  ;
			

			
			for (int i=0;i<bn;i++) {
				ab += a;
			}
			
			
			for (int i=0;i<an;i++) {
				ba += b;;
			}
			
			
			
			if(ab.compareTo(ba)<0) {
				System.out.println(ab);
			}else {
				System.out.println(ba);
			}
			
		}
				
	} import java.math.*; math.* java import java.util.*; util.* java public class Main {
	
		public static void main(String[] args) {
		
			Scanner sc = new Scanner(System.in);
			String a = sc.next();
			String b = sc.next();
			int an =Integer.parseInt(a);
			int bn =Integer.parseInt(b);
			
			
			String ab ="" ;
			String ba =""  ;
			

			
			for (int i=0;i<bn;i++) {
				ab += a;
			}
			
			
			for (int i=0;i<an;i++) {
				ba += b;;
			}
			
			
			
			if(ab.compareTo(ba)<0) {
				System.out.println(ab);
			}else {
				System.out.println(ba);
			}
			
		}
				
	} Main public static void main(String[] args) {
		
			Scanner sc = new Scanner(System.in);
			String a = sc.next();
			String b = sc.next();
			int an =Integer.parseInt(a);
			int bn =Integer.parseInt(b);
			
			
			String ab ="" ;
			String ba =""  ;
			

			
			for (int i=0;i<bn;i++) {
				ab += a;
			}
			
			
			for (int i=0;i<an;i++) {
				ba += b;;
			}
			
			
			
			if(ab.compareTo(ba)<0) {
				System.out.println(ab);
			}else {
				System.out.println(ba);
			}
			
		} main {
		
			Scanner sc = new Scanner(System.in);
			String a = sc.next();
			String b = sc.next();
			int an =Integer.parseInt(a);
			int bn =Integer.parseInt(b);
			
			
			String ab ="" ;
			String ba =""  ;
			

			
			for (int i=0;i<bn;i++) {
				ab += a;
			}
			
			
			for (int i=0;i<an;i++) {
				ba += b;;
			}
			
			
			
			if(ab.compareTo(ba)<0) {
				System.out.println(ab);
			}else {
				System.out.println(ba);
			}
			
		} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String a = sc.next(); a sc.next() sc.next sc String b = sc.next(); b sc.next() sc.next sc int an =Integer.parseInt(a); an Integer.parseInt(a) Integer.parseInt Integer a int bn =Integer.parseInt(b); bn Integer.parseInt(b) Integer.parseInt Integer b String ab ="" ; ab "" String ba =""  ; ba "" for (int i=0;i<bn;i++) {
				ab += a;
			} int i=0; int i=0; i 0 i<bn i bn i++ i++ i {
				ab += a;
			} {
				ab += a;
			} ab += a ab a for (int i=0;i<an;i++) {
				ba += b;;
			} int i=0; int i=0; i 0 i<an i an i++ i++ i {
				ba += b;;
			} {
				ba += b;;
			} ba += b ba b if(ab.compareTo(ba)<0) {
				System.out.println(ab);
			}else {
				System.out.println(ba);
			} ab.compareTo(ba)<0 ab.compareTo(ba) ab.compareTo ab ba 0 {
				System.out.println(ab);
			} System.out.println(ab) System.out.println System.out System System.out ab {
				System.out.println(ba);
			} System.out.println(ba) System.out.println System.out System System.out ba String[] args args public class Main {
	
		public static void main(String[] args) {
		
			Scanner sc = new Scanner(System.in);
			String a = sc.next();
			String b = sc.next();
			int an =Integer.parseInt(a);
			int bn =Integer.parseInt(b);
			
			
			String ab ="" ;
			String ba =""  ;
			

			
			for (int i=0;i<bn;i++) {
				ab += a;
			}
			
			
			for (int i=0;i<an;i++) {
				ba += b;;
			}
			
			
			
			if(ab.compareTo(ba)<0) {
				System.out.println(ab);
			}else {
				System.out.println(ba);
			}
			
		}
				
	} public class Main {
	
		public static void main(String[] args) {
		
			Scanner sc = new Scanner(System.in);
			String a = sc.next();
			String b = sc.next();
			int an =Integer.parseInt(a);
			int bn =Integer.parseInt(b);
			
			
			String ab ="" ;
			String ba =""  ;
			

			
			for (int i=0;i<bn;i++) {
				ab += a;
			}
			
			
			for (int i=0;i<an;i++) {
				ba += b;;
			}
			
			
			
			if(ab.compareTo(ba)<0) {
				System.out.println(ab);
			}else {
				System.out.println(ba);
			}
			
		}
				
	} Main
import java.math.*;
import java.util.*;
	
	public class Main {
	
		public static void main(String[] args) {
		
			Scanner sc = new Scanner(System.in);
			String a = sc.next();
			String b = sc.next();
			int an =Integer.parseInt(a);
			int bn =Integer.parseInt(b);
			
			
			String ab ="" ;
			String ba =""  ;
			

			
			for (int i=0;i<bn;i++) {
				ab += a;
			}
			
			
			for (int i=0;i<an;i++) {
				ba += b;;
			}
			
			
			
			if(ab.compareTo(ba)<0) {
				System.out.println(ab);
			}else {
				System.out.println(ba);
			}
			
		}
				
	}