import java.util.*;
import java.io.*;
public class Main {

	public static void main(String[] args)throws IOException {
		Scanner sc = new Scanner(System.in);
		int m=sc.nextInt(), n=sc.nextInt();
		String s1="", s2="";
		for(int i=0;i<m;i++)s1+=n;
		for(int i=0;i<n;i++)s2+=m;
		System.out.println(s1.compareTo(s2)<0?s1:s2);
	}
 
} import java.util.*; util.* java import java.io.*; io.* java public class Main {

	public static void main(String[] args)throws IOException {
		Scanner sc = new Scanner(System.in);
		int m=sc.nextInt(), n=sc.nextInt();
		String s1="", s2="";
		for(int i=0;i<m;i++)s1+=n;
		for(int i=0;i<n;i++)s2+=m;
		System.out.println(s1.compareTo(s2)<0?s1:s2);
	}
 
} Main public static void main(String[] args)throws IOException {
		Scanner sc = new Scanner(System.in);
		int m=sc.nextInt(), n=sc.nextInt();
		String s1="", s2="";
		for(int i=0;i<m;i++)s1+=n;
		for(int i=0;i<n;i++)s2+=m;
		System.out.println(s1.compareTo(s2)<0?s1:s2);
	} main {
		Scanner sc = new Scanner(System.in);
		int m=sc.nextInt(), n=sc.nextInt();
		String s1="", s2="";
		for(int i=0;i<m;i++)s1+=n;
		for(int i=0;i<n;i++)s2+=m;
		System.out.println(s1.compareTo(s2)<0?s1:s2);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int m=sc.nextInt() m sc.nextInt() sc.nextInt sc n=sc.nextInt(); n sc.nextInt() sc.nextInt sc String s1="" s1 "" s2=""; s2 "" for(int i=0;i<m;i++)s1+=n; int i=0; int i=0; i 0 i<m i m i++ i++ i s1+=n; s1+=n s1 n for(int i=0;i<n;i++)s2+=m; int i=0; int i=0; i 0 i<n i n i++ i++ i s2+=m; s2+=m s2 m System.out.println(s1.compareTo(s2)<0?s1:s2) System.out.println System.out System System.out s1.compareTo(s2)<0?s1:s2 s1.compareTo(s2)<0 s1.compareTo(s2) s1.compareTo s1 s2 0 s1 s2 String[] args args public class Main {

	public static void main(String[] args)throws IOException {
		Scanner sc = new Scanner(System.in);
		int m=sc.nextInt(), n=sc.nextInt();
		String s1="", s2="";
		for(int i=0;i<m;i++)s1+=n;
		for(int i=0;i<n;i++)s2+=m;
		System.out.println(s1.compareTo(s2)<0?s1:s2);
	}
 
} public class Main {

	public static void main(String[] args)throws IOException {
		Scanner sc = new Scanner(System.in);
		int m=sc.nextInt(), n=sc.nextInt();
		String s1="", s2="";
		for(int i=0;i<m;i++)s1+=n;
		for(int i=0;i<n;i++)s2+=m;
		System.out.println(s1.compareTo(s2)<0?s1:s2);
	}
 
} Main
import java.util.*;
import java.io.*;
public class Main {

	public static void main(String[] args)throws IOException {
		Scanner sc = new Scanner(System.in);
		int m=sc.nextInt(), n=sc.nextInt();
		String s1="", s2="";
		for(int i=0;i<m;i++)s1+=n;
		for(int i=0;i<n;i++)s2+=m;
		System.out.println(s1.compareTo(s2)<0?s1:s2);
	}
 
}