import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();

		String stra = String.valueOf(a);
		String strb = String.valueOf(b);
		String A = stra;
		String B = strb;
		for (int i=1; i<b; i++)
			A = A.concat(stra);
		
		for (int i=1; i<a; i++)
			B = B.concat(strb);
		
		if (A.compareTo(B) < 0)
			System.out.print(A);
		else
			System.out.print(B);

		
		sc.close();

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

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();

		String stra = String.valueOf(a);
		String strb = String.valueOf(b);
		String A = stra;
		String B = strb;
		for (int i=1; i<b; i++)
			A = A.concat(stra);
		
		for (int i=1; i<a; i++)
			B = B.concat(strb);
		
		if (A.compareTo(B) < 0)
			System.out.print(A);
		else
			System.out.print(B);

		
		sc.close();

	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();

		String stra = String.valueOf(a);
		String strb = String.valueOf(b);
		String A = stra;
		String B = strb;
		for (int i=1; i<b; i++)
			A = A.concat(stra);
		
		for (int i=1; i<a; i++)
			B = B.concat(strb);
		
		if (A.compareTo(B) < 0)
			System.out.print(A);
		else
			System.out.print(B);

		
		sc.close();

	} main {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();

		String stra = String.valueOf(a);
		String strb = String.valueOf(b);
		String A = stra;
		String B = strb;
		for (int i=1; i<b; i++)
			A = A.concat(stra);
		
		for (int i=1; i<a; i++)
			B = B.concat(strb);
		
		if (A.compareTo(B) < 0)
			System.out.print(A);
		else
			System.out.print(B);

		
		sc.close();

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc String stra = String.valueOf(a); stra String.valueOf(a) String.valueOf String a String strb = String.valueOf(b); strb String.valueOf(b) String.valueOf String b String A = stra; A stra String B = strb; B strb for (int i=1; i<b; i++)
			A = A.concat(stra); int i=1; int i=1; i 1 i<b i b i++ i++ i A = A.concat(stra); A = A.concat(stra) A A.concat(stra) A.concat A stra for (int i=1; i<a; i++)
			B = B.concat(strb); int i=1; int i=1; i 1 i<a i a i++ i++ i B = B.concat(strb); B = B.concat(strb) B B.concat(strb) B.concat B strb if (A.compareTo(B) < 0)
			System.out.print(A);
		else
			System.out.print(B); A.compareTo(B) < 0 A.compareTo(B) A.compareTo A B 0 System.out.print(A) System.out.print System.out System System.out A System.out.print(B) System.out.print System.out System System.out B sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();

		String stra = String.valueOf(a);
		String strb = String.valueOf(b);
		String A = stra;
		String B = strb;
		for (int i=1; i<b; i++)
			A = A.concat(stra);
		
		for (int i=1; i<a; i++)
			B = B.concat(strb);
		
		if (A.compareTo(B) < 0)
			System.out.print(A);
		else
			System.out.print(B);

		
		sc.close();

	}
} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();

		String stra = String.valueOf(a);
		String strb = String.valueOf(b);
		String A = stra;
		String B = strb;
		for (int i=1; i<b; i++)
			A = A.concat(stra);
		
		for (int i=1; i<a; i++)
			B = B.concat(strb);
		
		if (A.compareTo(B) < 0)
			System.out.print(A);
		else
			System.out.print(B);

		
		sc.close();

	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();

		String stra = String.valueOf(a);
		String strb = String.valueOf(b);
		String A = stra;
		String B = strb;
		for (int i=1; i<b; i++)
			A = A.concat(stra);
		
		for (int i=1; i<a; i++)
			B = B.concat(strb);
		
		if (A.compareTo(B) < 0)
			System.out.print(A);
		else
			System.out.print(B);

		
		sc.close();

	}
}
