
import java.math.BigInteger;
import java.util.Scanner;
import java.util.Arrays;

public class Main {
    public static void main(String[] args) {
        int n, i, j, m, k, p, q, o, l, s, tt = 1;
        Double x,y,z;
        int ar[];
        char ch;
        BigInteger an, su, u, v;
        String a,b="",c="",d;
        Scanner sc = new Scanner(System.in);
        n=sc.nextInt();
        m=sc.nextInt();
        for(i=0;i<n;i++)
        {
            b+=(char)(m+'0');
        }
        for(i=0;i<m;i++)
        {
            c+=(char)(n+'0');
        }
        k=0;
        for(i=0;i<n && i<m;i++)
        {
            p=b.charAt(i)-'0';
            q=c.charAt(i)-'0';
            if(p>q)
            {
                break;
            }
            else if(p<q)
            {
                k=1;
                break;
            }
        }
        if(k==0)
        {
            System.out.println(c);
        }
        else
        {
            System.out.println(b);}




    }
}
 import java.math.BigInteger; BigInteger java.math import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util public class Main {
    public static void main(String[] args) {
        int n, i, j, m, k, p, q, o, l, s, tt = 1;
        Double x,y,z;
        int ar[];
        char ch;
        BigInteger an, su, u, v;
        String a,b="",c="",d;
        Scanner sc = new Scanner(System.in);
        n=sc.nextInt();
        m=sc.nextInt();
        for(i=0;i<n;i++)
        {
            b+=(char)(m+'0');
        }
        for(i=0;i<m;i++)
        {
            c+=(char)(n+'0');
        }
        k=0;
        for(i=0;i<n && i<m;i++)
        {
            p=b.charAt(i)-'0';
            q=c.charAt(i)-'0';
            if(p>q)
            {
                break;
            }
            else if(p<q)
            {
                k=1;
                break;
            }
        }
        if(k==0)
        {
            System.out.println(c);
        }
        else
        {
            System.out.println(b);}




    }
} Main public static void main(String[] args) {
        int n, i, j, m, k, p, q, o, l, s, tt = 1;
        Double x,y,z;
        int ar[];
        char ch;
        BigInteger an, su, u, v;
        String a,b="",c="",d;
        Scanner sc = new Scanner(System.in);
        n=sc.nextInt();
        m=sc.nextInt();
        for(i=0;i<n;i++)
        {
            b+=(char)(m+'0');
        }
        for(i=0;i<m;i++)
        {
            c+=(char)(n+'0');
        }
        k=0;
        for(i=0;i<n && i<m;i++)
        {
            p=b.charAt(i)-'0';
            q=c.charAt(i)-'0';
            if(p>q)
            {
                break;
            }
            else if(p<q)
            {
                k=1;
                break;
            }
        }
        if(k==0)
        {
            System.out.println(c);
        }
        else
        {
            System.out.println(b);}




    } main {
        int n, i, j, m, k, p, q, o, l, s, tt = 1;
        Double x,y,z;
        int ar[];
        char ch;
        BigInteger an, su, u, v;
        String a,b="",c="",d;
        Scanner sc = new Scanner(System.in);
        n=sc.nextInt();
        m=sc.nextInt();
        for(i=0;i<n;i++)
        {
            b+=(char)(m+'0');
        }
        for(i=0;i<m;i++)
        {
            c+=(char)(n+'0');
        }
        k=0;
        for(i=0;i<n && i<m;i++)
        {
            p=b.charAt(i)-'0';
            q=c.charAt(i)-'0';
            if(p>q)
            {
                break;
            }
            else if(p<q)
            {
                k=1;
                break;
            }
        }
        if(k==0)
        {
            System.out.println(c);
        }
        else
        {
            System.out.println(b);}




    } int n n i i j j m m k k p p q q o o l l s s tt = 1; tt 1 Double x x y y z; z int ar[]; ar char ch; ch BigInteger an an su su u u v; v String a a b="" b "" c="" c "" d; d Scanner sc = new Scanner(System.in); sc new Scanner(System.in) n=sc.nextInt() n sc.nextInt() sc.nextInt sc m=sc.nextInt() m sc.nextInt() sc.nextInt sc for(i=0;i<n;i++)
        {
            b+=(char)(m+'0');
        } i=0; i=0 i 0 i<n i n i++ i++ i {
            b+=(char)(m+'0');
        } {
            b+=(char)(m+'0');
        } b+=(char)(m+'0') b (char)(m+'0') m '0' for(i=0;i<m;i++)
        {
            c+=(char)(n+'0');
        } i=0; i=0 i 0 i<m i m i++ i++ i {
            c+=(char)(n+'0');
        } {
            c+=(char)(n+'0');
        } c+=(char)(n+'0') c (char)(n+'0') n '0' k=0 k 0 for(i=0;i<n && i<m;i++)
        {
            p=b.charAt(i)-'0';
            q=c.charAt(i)-'0';
            if(p>q)
            {
                break;
            }
            else if(p<q)
            {
                k=1;
                break;
            }
        } i=0; i=0 i 0 i<n && i<m i<n i n i<m i m i++ i++ i {
            p=b.charAt(i)-'0';
            q=c.charAt(i)-'0';
            if(p>q)
            {
                break;
            }
            else if(p<q)
            {
                k=1;
                break;
            }
        } {
            p=b.charAt(i)-'0';
            q=c.charAt(i)-'0';
            if(p>q)
            {
                break;
            }
            else if(p<q)
            {
                k=1;
                break;
            }
        } p=b.charAt(i)-'0' p b.charAt(i)-'0' b.charAt(i) b.charAt b i '0' q=c.charAt(i)-'0' q c.charAt(i)-'0' c.charAt(i) c.charAt c i '0' if(p>q)
            {
                break;
            }
            else if(p<q)
            {
                k=1;
                break;
            } p>q p q {
                break;
            } break; if(p<q)
            {
                k=1;
                break;
            } p<q p q {
                k=1;
                break;
            } k=1 k 1 break; if(k==0)
        {
            System.out.println(c);
        }
        else
        {
            System.out.println(b);} k==0 k 0 {
            System.out.println(c);
        } System.out.println(c) System.out.println System.out System System.out c {
            System.out.println(b);} System.out.println(b) System.out.println System.out System System.out b String[] args args public class Main {
    public static void main(String[] args) {
        int n, i, j, m, k, p, q, o, l, s, tt = 1;
        Double x,y,z;
        int ar[];
        char ch;
        BigInteger an, su, u, v;
        String a,b="",c="",d;
        Scanner sc = new Scanner(System.in);
        n=sc.nextInt();
        m=sc.nextInt();
        for(i=0;i<n;i++)
        {
            b+=(char)(m+'0');
        }
        for(i=0;i<m;i++)
        {
            c+=(char)(n+'0');
        }
        k=0;
        for(i=0;i<n && i<m;i++)
        {
            p=b.charAt(i)-'0';
            q=c.charAt(i)-'0';
            if(p>q)
            {
                break;
            }
            else if(p<q)
            {
                k=1;
                break;
            }
        }
        if(k==0)
        {
            System.out.println(c);
        }
        else
        {
            System.out.println(b);}




    }
} public class Main {
    public static void main(String[] args) {
        int n, i, j, m, k, p, q, o, l, s, tt = 1;
        Double x,y,z;
        int ar[];
        char ch;
        BigInteger an, su, u, v;
        String a,b="",c="",d;
        Scanner sc = new Scanner(System.in);
        n=sc.nextInt();
        m=sc.nextInt();
        for(i=0;i<n;i++)
        {
            b+=(char)(m+'0');
        }
        for(i=0;i<m;i++)
        {
            c+=(char)(n+'0');
        }
        k=0;
        for(i=0;i<n && i<m;i++)
        {
            p=b.charAt(i)-'0';
            q=c.charAt(i)-'0';
            if(p>q)
            {
                break;
            }
            else if(p<q)
            {
                k=1;
                break;
            }
        }
        if(k==0)
        {
            System.out.println(c);
        }
        else
        {
            System.out.println(b);}




    }
} Main

import java.math.BigInteger;
import java.util.Scanner;
import java.util.Arrays;

public class Main {
    public static void main(String[] args) {
        int n, i, j, m, k, p, q, o, l, s, tt = 1;
        Double x,y,z;
        int ar[];
        char ch;
        BigInteger an, su, u, v;
        String a,b="",c="",d;
        Scanner sc = new Scanner(System.in);
        n=sc.nextInt();
        m=sc.nextInt();
        for(i=0;i<n;i++)
        {
            b+=(char)(m+'0');
        }
        for(i=0;i<m;i++)
        {
            c+=(char)(n+'0');
        }
        k=0;
        for(i=0;i<n && i<m;i++)
        {
            p=b.charAt(i)-'0';
            q=c.charAt(i)-'0';
            if(p>q)
            {
                break;
            }
            else if(p<q)
            {
                k=1;
                break;
            }
        }
        if(k==0)
        {
            System.out.println(c);
        }
        else
        {
            System.out.println(b);}




    }
}

