import java.util.*;
import java.io.*;
public class Main{
/// functions
static long gcd(long a,long b){if(b==0){return a;}return gcd(b,a%b);}
static long Modpow(long a,long p,long m){if(p==1){return a;}long x=Modpow(a,p/2,m);x=(x*x)%m;return (p&1l)!=0? (x*a)%m:x;}
static long Modmul(long a,long b,long m){return ((a%m)*(b%m))%m;}
static long ModInv(long a,long m){return Modpow(a,m-2,m);}
static long nck(int n,int r,long m){if(r>n){return 0l;}return Modmul(f[n],ModInv(Modmul(f[n-r],f[r],m),m),m);}
// end
static long[] f;

public static void main(String[] args) throws FileNotFoundException, IOException{
       Scanner s=new Scanner(System.in);
       StringBuilder sb=new StringBuilder();
       StringBuilder sb1=new StringBuilder();
       BufferedWriter out=new BufferedWriter(new OutputStreamWriter(System.out));
       int n=s.nextInt(),m=s.nextInt();
       for(int i=0;i<m;i++){sb.append(n);}
       	for(int i=0;i<n;i++){sb1.append(m);}
         String s1=sb.toString();
         String s2=sb1.toString();
         s1=s1.compareTo(s2)>0?s2:s1;
        out.write(s1+"");
       out.flush();

      /* long res=0;
       String m=Integer.toString(n);
       int k=m.length();
       for(int i=11;i<=n;i++){
       	if(i%10==0){continue;}
       	String ss=Integer.toString(i);
       	int l=ss.length();
       	long tmp=0;
       	if((ss.charAt(l-1)-'0'<=m.charAt(0)-'0')&&(ss.charAt(0)-'0'<=m.charAt(k-1)-'0')){
       		 tmp++;
       		 long tmp1=0;
       		 if((ss.charAt(l-1)==ss.charAt(0))&&l>1){tmp1++;}
       		for(int j=1;j<k-1;j++){
       			int xx=m.charAt(j)-'0';
       			tmp=(long)tmp*xx;
       		}
       		 tmp+=tmp1;
       		res+=tmp;
       	}
       	//out.write(i+" "+tmp+"\n");
       }
       res+=Math.min(9,n);
       for(int i=1;i<=Math.min(9,n);i++){
       		String ss=Integer.toString(i);
       	int l=ss.length();
       	long tmp=0;
       	if((ss.charAt(l-1)-'0'<=m.charAt(0)-'0')&&(ss.charAt(0)-'0'<=m.charAt(k-1)-'0')){
       		tmp++;
              for(int j=1;j<k-1;j++){
       			int xx=m.charAt(j)-'0';
       			tmp=(long)tmp*xx;
       		}
       	}
       	   res+=tmp;
       }
       out.write(res+"");
        out.flush();*/
  }
} import java.util.*; util.* java import java.io.*; io.* java public class Main{
/// functions
static long gcd(long a,long b){if(b==0){return a;}return gcd(b,a%b);}
static long Modpow(long a,long p,long m){if(p==1){return a;}long x=Modpow(a,p/2,m);x=(x*x)%m;return (p&1l)!=0? (x*a)%m:x;}
static long Modmul(long a,long b,long m){return ((a%m)*(b%m))%m;}
static long ModInv(long a,long m){return Modpow(a,m-2,m);}
static long nck(int n,int r,long m){if(r>n){return 0l;}return Modmul(f[n],ModInv(Modmul(f[n-r],f[r],m),m),m);}
// end
static long[] f;

public static void main(String[] args) throws FileNotFoundException, IOException{
       Scanner s=new Scanner(System.in);
       StringBuilder sb=new StringBuilder();
       StringBuilder sb1=new StringBuilder();
       BufferedWriter out=new BufferedWriter(new OutputStreamWriter(System.out));
       int n=s.nextInt(),m=s.nextInt();
       for(int i=0;i<m;i++){sb.append(n);}
       	for(int i=0;i<n;i++){sb1.append(m);}
         String s1=sb.toString();
         String s2=sb1.toString();
         s1=s1.compareTo(s2)>0?s2:s1;
        out.write(s1+"");
       out.flush();

      /* long res=0;
       String m=Integer.toString(n);
       int k=m.length();
       for(int i=11;i<=n;i++){
       	if(i%10==0){continue;}
       	String ss=Integer.toString(i);
       	int l=ss.length();
       	long tmp=0;
       	if((ss.charAt(l-1)-'0'<=m.charAt(0)-'0')&&(ss.charAt(0)-'0'<=m.charAt(k-1)-'0')){
       		 tmp++;
       		 long tmp1=0;
       		 if((ss.charAt(l-1)==ss.charAt(0))&&l>1){tmp1++;}
       		for(int j=1;j<k-1;j++){
       			int xx=m.charAt(j)-'0';
       			tmp=(long)tmp*xx;
       		}
       		 tmp+=tmp1;
       		res+=tmp;
       	}
       	//out.write(i+" "+tmp+"\n");
       }
       res+=Math.min(9,n);
       for(int i=1;i<=Math.min(9,n);i++){
       		String ss=Integer.toString(i);
       	int l=ss.length();
       	long tmp=0;
       	if((ss.charAt(l-1)-'0'<=m.charAt(0)-'0')&&(ss.charAt(0)-'0'<=m.charAt(k-1)-'0')){
       		tmp++;
              for(int j=1;j<k-1;j++){
       			int xx=m.charAt(j)-'0';
       			tmp=(long)tmp*xx;
       		}
       	}
       	   res+=tmp;
       }
       out.write(res+"");
        out.flush();*/
  }
} Main // end
static long[] f; f /// functions
static long gcd(long a,long b){if(b==0){return a;}return gcd(b,a%b);} gcd {if(b==0){return a;}return gcd(b,a%b);} if(b==0){return a;} b==0 b 0 {return a;} return a; a return gcd(b,a%b); gcd(b,a%b) gcd b a%b a b long a a long b b static long Modpow(long a,long p,long m){if(p==1){return a;}long x=Modpow(a,p/2,m);x=(x*x)%m;return (p&1l)!=0? (x*a)%m:x;} Modpow {if(p==1){return a;}long x=Modpow(a,p/2,m);x=(x*x)%m;return (p&1l)!=0? (x*a)%m:x;} if(p==1){return a;} p==1 p 1 {return a;} return a; a long x=Modpow(a,p/2,m); x Modpow(a,p/2,m) Modpow a p/2 p 2 m x=(x*x)%m x (x*x)%m (x*x) x x m return (p&1l)!=0? (x*a)%m:x; (p&1l)!=0? (x*a)%m:x (p&1l)!=0 (p&1l) p 1l 0 (x*a)%m (x*a) x a m x long a a long p p long m m static long Modmul(long a,long b,long m){return ((a%m)*(b%m))%m;} Modmul {return ((a%m)*(b%m))%m;} return ((a%m)*(b%m))%m; ((a%m)*(b%m))%m ((a%m)*(b%m)) (a%m) a m (b%m) b m m long a a long b b long m m static long ModInv(long a,long m){return Modpow(a,m-2,m);} ModInv {return Modpow(a,m-2,m);} return Modpow(a,m-2,m); Modpow(a,m-2,m) Modpow a m-2 m 2 m long a a long m m static long nck(int n,int r,long m){if(r>n){return 0l;}return Modmul(f[n],ModInv(Modmul(f[n-r],f[r],m),m),m);} nck {if(r>n){return 0l;}return Modmul(f[n],ModInv(Modmul(f[n-r],f[r],m),m),m);} if(r>n){return 0l;} r>n r n {return 0l;} return 0l; 0l return Modmul(f[n],ModInv(Modmul(f[n-r],f[r],m),m),m); Modmul(f[n],ModInv(Modmul(f[n-r],f[r],m),m),m) Modmul f[n] f n ModInv(Modmul(f[n-r],f[r],m),m) ModInv Modmul(f[n-r],f[r],m) Modmul f[n-r] f n-r n r f[r] f r m m m int n n int r r long m m public static void main(String[] args) throws FileNotFoundException, IOException{
       Scanner s=new Scanner(System.in);
       StringBuilder sb=new StringBuilder();
       StringBuilder sb1=new StringBuilder();
       BufferedWriter out=new BufferedWriter(new OutputStreamWriter(System.out));
       int n=s.nextInt(),m=s.nextInt();
       for(int i=0;i<m;i++){sb.append(n);}
       	for(int i=0;i<n;i++){sb1.append(m);}
         String s1=sb.toString();
         String s2=sb1.toString();
         s1=s1.compareTo(s2)>0?s2:s1;
        out.write(s1+"");
       out.flush();

      /* long res=0;
       String m=Integer.toString(n);
       int k=m.length();
       for(int i=11;i<=n;i++){
       	if(i%10==0){continue;}
       	String ss=Integer.toString(i);
       	int l=ss.length();
       	long tmp=0;
       	if((ss.charAt(l-1)-'0'<=m.charAt(0)-'0')&&(ss.charAt(0)-'0'<=m.charAt(k-1)-'0')){
       		 tmp++;
       		 long tmp1=0;
       		 if((ss.charAt(l-1)==ss.charAt(0))&&l>1){tmp1++;}
       		for(int j=1;j<k-1;j++){
       			int xx=m.charAt(j)-'0';
       			tmp=(long)tmp*xx;
       		}
       		 tmp+=tmp1;
       		res+=tmp;
       	}
       	//out.write(i+" "+tmp+"\n");
       }
       res+=Math.min(9,n);
       for(int i=1;i<=Math.min(9,n);i++){
       		String ss=Integer.toString(i);
       	int l=ss.length();
       	long tmp=0;
       	if((ss.charAt(l-1)-'0'<=m.charAt(0)-'0')&&(ss.charAt(0)-'0'<=m.charAt(k-1)-'0')){
       		tmp++;
              for(int j=1;j<k-1;j++){
       			int xx=m.charAt(j)-'0';
       			tmp=(long)tmp*xx;
       		}
       	}
       	   res+=tmp;
       }
       out.write(res+"");
        out.flush();*/
  } main {
       Scanner s=new Scanner(System.in);
       StringBuilder sb=new StringBuilder();
       StringBuilder sb1=new StringBuilder();
       BufferedWriter out=new BufferedWriter(new OutputStreamWriter(System.out));
       int n=s.nextInt(),m=s.nextInt();
       for(int i=0;i<m;i++){sb.append(n);}
       	for(int i=0;i<n;i++){sb1.append(m);}
         String s1=sb.toString();
         String s2=sb1.toString();
         s1=s1.compareTo(s2)>0?s2:s1;
        out.write(s1+"");
       out.flush();

      /* long res=0;
       String m=Integer.toString(n);
       int k=m.length();
       for(int i=11;i<=n;i++){
       	if(i%10==0){continue;}
       	String ss=Integer.toString(i);
       	int l=ss.length();
       	long tmp=0;
       	if((ss.charAt(l-1)-'0'<=m.charAt(0)-'0')&&(ss.charAt(0)-'0'<=m.charAt(k-1)-'0')){
       		 tmp++;
       		 long tmp1=0;
       		 if((ss.charAt(l-1)==ss.charAt(0))&&l>1){tmp1++;}
       		for(int j=1;j<k-1;j++){
       			int xx=m.charAt(j)-'0';
       			tmp=(long)tmp*xx;
       		}
       		 tmp+=tmp1;
       		res+=tmp;
       	}
       	//out.write(i+" "+tmp+"\n");
       }
       res+=Math.min(9,n);
       for(int i=1;i<=Math.min(9,n);i++){
       		String ss=Integer.toString(i);
       	int l=ss.length();
       	long tmp=0;
       	if((ss.charAt(l-1)-'0'<=m.charAt(0)-'0')&&(ss.charAt(0)-'0'<=m.charAt(k-1)-'0')){
       		tmp++;
              for(int j=1;j<k-1;j++){
       			int xx=m.charAt(j)-'0';
       			tmp=(long)tmp*xx;
       		}
       	}
       	   res+=tmp;
       }
       out.write(res+"");
        out.flush();*/
  } Scanner s=new Scanner(System.in); s new Scanner(System.in) StringBuilder sb=new StringBuilder(); sb new StringBuilder() StringBuilder sb1=new StringBuilder(); sb1 new StringBuilder() BufferedWriter out=new BufferedWriter(new OutputStreamWriter(System.out)); out new BufferedWriter(new OutputStreamWriter(System.out)) int n=s.nextInt() n s.nextInt() s.nextInt s m=s.nextInt(); m s.nextInt() s.nextInt s for(int i=0;i<m;i++){sb.append(n);} int i=0; int i=0; i 0 i<m i m i++ i++ i {sb.append(n);} {sb.append(n);} sb.append(n) sb.append sb n for(int i=0;i<n;i++){sb1.append(m);} int i=0; int i=0; i 0 i<n i n i++ i++ i {sb1.append(m);} {sb1.append(m);} sb1.append(m) sb1.append sb1 m String s1=sb.toString(); s1 sb.toString() sb.toString sb String s2=sb1.toString(); s2 sb1.toString() sb1.toString sb1 s1=s1.compareTo(s2)>0?s2:s1 s1 s1.compareTo(s2)>0?s2:s1 s1.compareTo(s2)>0 s1.compareTo(s2) s1.compareTo s1 s2 0 s2 s1 out.write(s1+"") out.write out s1+"" s1 "" out.flush() out.flush out String[] args args public class Main{
/// functions
static long gcd(long a,long b){if(b==0){return a;}return gcd(b,a%b);}
static long Modpow(long a,long p,long m){if(p==1){return a;}long x=Modpow(a,p/2,m);x=(x*x)%m;return (p&1l)!=0? (x*a)%m:x;}
static long Modmul(long a,long b,long m){return ((a%m)*(b%m))%m;}
static long ModInv(long a,long m){return Modpow(a,m-2,m);}
static long nck(int n,int r,long m){if(r>n){return 0l;}return Modmul(f[n],ModInv(Modmul(f[n-r],f[r],m),m),m);}
// end
static long[] f;

public static void main(String[] args) throws FileNotFoundException, IOException{
       Scanner s=new Scanner(System.in);
       StringBuilder sb=new StringBuilder();
       StringBuilder sb1=new StringBuilder();
       BufferedWriter out=new BufferedWriter(new OutputStreamWriter(System.out));
       int n=s.nextInt(),m=s.nextInt();
       for(int i=0;i<m;i++){sb.append(n);}
       	for(int i=0;i<n;i++){sb1.append(m);}
         String s1=sb.toString();
         String s2=sb1.toString();
         s1=s1.compareTo(s2)>0?s2:s1;
        out.write(s1+"");
       out.flush();

      /* long res=0;
       String m=Integer.toString(n);
       int k=m.length();
       for(int i=11;i<=n;i++){
       	if(i%10==0){continue;}
       	String ss=Integer.toString(i);
       	int l=ss.length();
       	long tmp=0;
       	if((ss.charAt(l-1)-'0'<=m.charAt(0)-'0')&&(ss.charAt(0)-'0'<=m.charAt(k-1)-'0')){
       		 tmp++;
       		 long tmp1=0;
       		 if((ss.charAt(l-1)==ss.charAt(0))&&l>1){tmp1++;}
       		for(int j=1;j<k-1;j++){
       			int xx=m.charAt(j)-'0';
       			tmp=(long)tmp*xx;
       		}
       		 tmp+=tmp1;
       		res+=tmp;
       	}
       	//out.write(i+" "+tmp+"\n");
       }
       res+=Math.min(9,n);
       for(int i=1;i<=Math.min(9,n);i++){
       		String ss=Integer.toString(i);
       	int l=ss.length();
       	long tmp=0;
       	if((ss.charAt(l-1)-'0'<=m.charAt(0)-'0')&&(ss.charAt(0)-'0'<=m.charAt(k-1)-'0')){
       		tmp++;
              for(int j=1;j<k-1;j++){
       			int xx=m.charAt(j)-'0';
       			tmp=(long)tmp*xx;
       		}
       	}
       	   res+=tmp;
       }
       out.write(res+"");
        out.flush();*/
  }
} public class Main{
/// functions
static long gcd(long a,long b){if(b==0){return a;}return gcd(b,a%b);}
static long Modpow(long a,long p,long m){if(p==1){return a;}long x=Modpow(a,p/2,m);x=(x*x)%m;return (p&1l)!=0? (x*a)%m:x;}
static long Modmul(long a,long b,long m){return ((a%m)*(b%m))%m;}
static long ModInv(long a,long m){return Modpow(a,m-2,m);}
static long nck(int n,int r,long m){if(r>n){return 0l;}return Modmul(f[n],ModInv(Modmul(f[n-r],f[r],m),m),m);}
// end
static long[] f;

public static void main(String[] args) throws FileNotFoundException, IOException{
       Scanner s=new Scanner(System.in);
       StringBuilder sb=new StringBuilder();
       StringBuilder sb1=new StringBuilder();
       BufferedWriter out=new BufferedWriter(new OutputStreamWriter(System.out));
       int n=s.nextInt(),m=s.nextInt();
       for(int i=0;i<m;i++){sb.append(n);}
       	for(int i=0;i<n;i++){sb1.append(m);}
         String s1=sb.toString();
         String s2=sb1.toString();
         s1=s1.compareTo(s2)>0?s2:s1;
        out.write(s1+"");
       out.flush();

      /* long res=0;
       String m=Integer.toString(n);
       int k=m.length();
       for(int i=11;i<=n;i++){
       	if(i%10==0){continue;}
       	String ss=Integer.toString(i);
       	int l=ss.length();
       	long tmp=0;
       	if((ss.charAt(l-1)-'0'<=m.charAt(0)-'0')&&(ss.charAt(0)-'0'<=m.charAt(k-1)-'0')){
       		 tmp++;
       		 long tmp1=0;
       		 if((ss.charAt(l-1)==ss.charAt(0))&&l>1){tmp1++;}
       		for(int j=1;j<k-1;j++){
       			int xx=m.charAt(j)-'0';
       			tmp=(long)tmp*xx;
       		}
       		 tmp+=tmp1;
       		res+=tmp;
       	}
       	//out.write(i+" "+tmp+"\n");
       }
       res+=Math.min(9,n);
       for(int i=1;i<=Math.min(9,n);i++){
       		String ss=Integer.toString(i);
       	int l=ss.length();
       	long tmp=0;
       	if((ss.charAt(l-1)-'0'<=m.charAt(0)-'0')&&(ss.charAt(0)-'0'<=m.charAt(k-1)-'0')){
       		tmp++;
              for(int j=1;j<k-1;j++){
       			int xx=m.charAt(j)-'0';
       			tmp=(long)tmp*xx;
       		}
       	}
       	   res+=tmp;
       }
       out.write(res+"");
        out.flush();*/
  }
} Main
import java.util.*;
import java.io.*;
public class Main{
/// functions
static long gcd(long a,long b){if(b==0){return a;}return gcd(b,a%b);}
static long Modpow(long a,long p,long m){if(p==1){return a;}long x=Modpow(a,p/2,m);x=(x*x)%m;return (p&1l)!=0? (x*a)%m:x;}
static long Modmul(long a,long b,long m){return ((a%m)*(b%m))%m;}
static long ModInv(long a,long m){return Modpow(a,m-2,m);}
static long nck(int n,int r,long m){if(r>n){return 0l;}return Modmul(f[n],ModInv(Modmul(f[n-r],f[r],m),m),m);}
// end
static long[] f;

public static void main(String[] args) throws FileNotFoundException, IOException{
       Scanner s=new Scanner(System.in);
       StringBuilder sb=new StringBuilder();
       StringBuilder sb1=new StringBuilder();
       BufferedWriter out=new BufferedWriter(new OutputStreamWriter(System.out));
       int n=s.nextInt(),m=s.nextInt();
       for(int i=0;i<m;i++){sb.append(n);}
       	for(int i=0;i<n;i++){sb1.append(m);}
         String s1=sb.toString();
         String s2=sb1.toString();
         s1=s1.compareTo(s2)>0?s2:s1;
        out.write(s1+"");
       out.flush();

      /* long res=0;
       String m=Integer.toString(n);
       int k=m.length();
       for(int i=11;i<=n;i++){
       	if(i%10==0){continue;}
       	String ss=Integer.toString(i);
       	int l=ss.length();
       	long tmp=0;
       	if((ss.charAt(l-1)-'0'<=m.charAt(0)-'0')&&(ss.charAt(0)-'0'<=m.charAt(k-1)-'0')){
       		 tmp++;
       		 long tmp1=0;
       		 if((ss.charAt(l-1)==ss.charAt(0))&&l>1){tmp1++;}
       		for(int j=1;j<k-1;j++){
       			int xx=m.charAt(j)-'0';
       			tmp=(long)tmp*xx;
       		}
       		 tmp+=tmp1;
       		res+=tmp;
       	}
       	//out.write(i+" "+tmp+"\n");
       }
       res+=Math.min(9,n);
       for(int i=1;i<=Math.min(9,n);i++){
       		String ss=Integer.toString(i);
       	int l=ss.length();
       	long tmp=0;
       	if((ss.charAt(l-1)-'0'<=m.charAt(0)-'0')&&(ss.charAt(0)-'0'<=m.charAt(k-1)-'0')){
       		tmp++;
              for(int j=1;j<k-1;j++){
       			int xx=m.charAt(j)-'0';
       			tmp=(long)tmp*xx;
       		}
       	}
       	   res+=tmp;
       }
       out.write(res+"");
        out.flush();*/
  }
}
