import java.util.*;
import java.lang.Math.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		String b = sc.next();
        
        StringBuilder ab = new StringBuilder();
        StringBuilder ba = new StringBuilder();
      
        for (int i = 0; i < Integer.parseInt(b); i++) {
            ab.append(a);
        }
      
        for (int i = 0; i < Integer.parseInt(a); i++) {
            ba.append(b);
        }

      
        String answer = null;
        if (a.charAt(0) <= b.charAt(0)) {
            System.out.println(ab);
        } else {
            System.out.println(ba);
        }
	}
} import java.util.*; util.* java import java.lang.Math.*; Math.* java.lang public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		String b = sc.next();
        
        StringBuilder ab = new StringBuilder();
        StringBuilder ba = new StringBuilder();
      
        for (int i = 0; i < Integer.parseInt(b); i++) {
            ab.append(a);
        }
      
        for (int i = 0; i < Integer.parseInt(a); i++) {
            ba.append(b);
        }

      
        String answer = null;
        if (a.charAt(0) <= b.charAt(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();
        
        StringBuilder ab = new StringBuilder();
        StringBuilder ba = new StringBuilder();
      
        for (int i = 0; i < Integer.parseInt(b); i++) {
            ab.append(a);
        }
      
        for (int i = 0; i < Integer.parseInt(a); i++) {
            ba.append(b);
        }

      
        String answer = null;
        if (a.charAt(0) <= b.charAt(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();
        
        StringBuilder ab = new StringBuilder();
        StringBuilder ba = new StringBuilder();
      
        for (int i = 0; i < Integer.parseInt(b); i++) {
            ab.append(a);
        }
      
        for (int i = 0; i < Integer.parseInt(a); i++) {
            ba.append(b);
        }

      
        String answer = null;
        if (a.charAt(0) <= b.charAt(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 StringBuilder ab = new StringBuilder(); ab new StringBuilder() StringBuilder ba = new StringBuilder(); ba new StringBuilder() for (int i = 0; i < Integer.parseInt(b); i++) {
            ab.append(a);
        } int i = 0; int i = 0; i 0 i < Integer.parseInt(b) i Integer.parseInt(b) Integer.parseInt Integer b i++ i++ i {
            ab.append(a);
        } {
            ab.append(a);
        } ab.append(a) ab.append ab a for (int i = 0; i < Integer.parseInt(a); i++) {
            ba.append(b);
        } int i = 0; int i = 0; i 0 i < Integer.parseInt(a) i Integer.parseInt(a) Integer.parseInt Integer a i++ i++ i {
            ba.append(b);
        } {
            ba.append(b);
        } ba.append(b) ba.append ba b String answer = null; answer null if (a.charAt(0) <= b.charAt(0)) {
            System.out.println(ab);
        } else {
            System.out.println(ba);
        } a.charAt(0) <= b.charAt(0) a.charAt(0) a.charAt a 0 b.charAt(0) b.charAt b 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();
        
        StringBuilder ab = new StringBuilder();
        StringBuilder ba = new StringBuilder();
      
        for (int i = 0; i < Integer.parseInt(b); i++) {
            ab.append(a);
        }
      
        for (int i = 0; i < Integer.parseInt(a); i++) {
            ba.append(b);
        }

      
        String answer = null;
        if (a.charAt(0) <= b.charAt(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();
        
        StringBuilder ab = new StringBuilder();
        StringBuilder ba = new StringBuilder();
      
        for (int i = 0; i < Integer.parseInt(b); i++) {
            ab.append(a);
        }
      
        for (int i = 0; i < Integer.parseInt(a); i++) {
            ba.append(b);
        }

      
        String answer = null;
        if (a.charAt(0) <= b.charAt(0)) {
            System.out.println(ab);
        } else {
            System.out.println(ba);
        }
	}
} Main
import java.util.*;
import java.lang.Math.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		String b = sc.next();
        
        StringBuilder ab = new StringBuilder();
        StringBuilder ba = new StringBuilder();
      
        for (int i = 0; i < Integer.parseInt(b); i++) {
            ab.append(a);
        }
      
        for (int i = 0; i < Integer.parseInt(a); i++) {
            ba.append(b);
        }

      
        String answer = null;
        if (a.charAt(0) <= b.charAt(0)) {
            System.out.println(ab);
        } else {
            System.out.println(ba);
        }
	}
}