import java.util.*;
import java.io.*;
 
public class Main {
    static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");
 
        String next() {
            while (!st.hasMoreTokens())
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }
 
        int nextInt() {
            return Integer.parseInt(next());
        }
 
        double nextDouble() {
            return Double.parseDouble(next());
        }
 
        int[] readArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }
 
        long nextLong() {
            return Long.parseLong(next());
        }
 
        public long[] readLongArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++) a[i] = nextLong();
            return a;
        }
    }
 
    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
      PrintWriter out = new PrintWriter(System.out);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s1 = Integer.toString(a);
        String s2 = Integer.toString(b);
//        String sc1 = "";
//        String sc2 = "";
        for (int i = 0; i < b - 1; ++i) {
            s1 += s1.charAt(i);
        }
        for (int i = 0; i < a - 1; ++i) {
            s2 += s2.charAt(i);
        }
//        boolean ok = false;
//        for (int i = 0; i < a ; ++i) {
//            for(int j = 0; j <)
//            if (s1.charAt(i) >= s2.charAt(i)) {
//                ok = true;
//            }
//
//
//        }
//        if (ok == true) {
//            System.out.println(s2);
//        } else {
//            System.out.println(s1);
//        }
         if(a >= b){
             out.println(s2);
         }
         else{
             out.println(s1);
         }
      out.close();
    }
} import java.util.*; util.* java import java.io.*; io.* java public class Main {
    static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");
 
        String next() {
            while (!st.hasMoreTokens())
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }
 
        int nextInt() {
            return Integer.parseInt(next());
        }
 
        double nextDouble() {
            return Double.parseDouble(next());
        }
 
        int[] readArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }
 
        long nextLong() {
            return Long.parseLong(next());
        }
 
        public long[] readLongArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++) a[i] = nextLong();
            return a;
        }
    }
 
    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
      PrintWriter out = new PrintWriter(System.out);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s1 = Integer.toString(a);
        String s2 = Integer.toString(b);
//        String sc1 = "";
//        String sc2 = "";
        for (int i = 0; i < b - 1; ++i) {
            s1 += s1.charAt(i);
        }
        for (int i = 0; i < a - 1; ++i) {
            s2 += s2.charAt(i);
        }
//        boolean ok = false;
//        for (int i = 0; i < a ; ++i) {
//            for(int j = 0; j <)
//            if (s1.charAt(i) >= s2.charAt(i)) {
//                ok = true;
//            }
//
//
//        }
//        if (ok == true) {
//            System.out.println(s2);
//        } else {
//            System.out.println(s1);
//        }
         if(a >= b){
             out.println(s2);
         }
         else{
             out.println(s1);
         }
      out.close();
    }
} Main public static void main(String[] args) {
        FastScanner sc = new FastScanner();
      PrintWriter out = new PrintWriter(System.out);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s1 = Integer.toString(a);
        String s2 = Integer.toString(b);
//        String sc1 = "";
//        String sc2 = "";
        for (int i = 0; i < b - 1; ++i) {
            s1 += s1.charAt(i);
        }
        for (int i = 0; i < a - 1; ++i) {
            s2 += s2.charAt(i);
        }
//        boolean ok = false;
//        for (int i = 0; i < a ; ++i) {
//            for(int j = 0; j <)
//            if (s1.charAt(i) >= s2.charAt(i)) {
//                ok = true;
//            }
//
//
//        }
//        if (ok == true) {
//            System.out.println(s2);
//        } else {
//            System.out.println(s1);
//        }
         if(a >= b){
             out.println(s2);
         }
         else{
             out.println(s1);
         }
      out.close();
    } main {
        FastScanner sc = new FastScanner();
      PrintWriter out = new PrintWriter(System.out);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s1 = Integer.toString(a);
        String s2 = Integer.toString(b);
//        String sc1 = "";
//        String sc2 = "";
        for (int i = 0; i < b - 1; ++i) {
            s1 += s1.charAt(i);
        }
        for (int i = 0; i < a - 1; ++i) {
            s2 += s2.charAt(i);
        }
//        boolean ok = false;
//        for (int i = 0; i < a ; ++i) {
//            for(int j = 0; j <)
//            if (s1.charAt(i) >= s2.charAt(i)) {
//                ok = true;
//            }
//
//
//        }
//        if (ok == true) {
//            System.out.println(s2);
//        } else {
//            System.out.println(s1);
//        }
         if(a >= b){
             out.println(s2);
         }
         else{
             out.println(s1);
         }
      out.close();
    } FastScanner sc = new FastScanner(); sc new FastScanner() PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc String s1 = Integer.toString(a); s1 Integer.toString(a) Integer.toString Integer a String s2 = Integer.toString(b); s2 Integer.toString(b) Integer.toString Integer b for (int i = 0; i < b - 1; ++i) {
            s1 += s1.charAt(i);
        } int i = 0; int i = 0; i 0 i < b - 1 i b - 1 b 1 ++i ++i i {
            s1 += s1.charAt(i);
        } {
            s1 += s1.charAt(i);
        } s1 += s1.charAt(i) s1 s1.charAt(i) s1.charAt s1 i for (int i = 0; i < a - 1; ++i) {
            s2 += s2.charAt(i);
        } int i = 0; int i = 0; i 0 i < a - 1 i a - 1 a 1 ++i ++i i {
            s2 += s2.charAt(i);
        } {
            s2 += s2.charAt(i);
        } s2 += s2.charAt(i) s2 s2.charAt(i) s2.charAt s2 i if(a >= b){
             out.println(s2);
         }
         else{
             out.println(s1);
         } a >= b a b {
             out.println(s2);
         } out.println(s2) out.println out s2 {
             out.println(s1);
         } out.println(s1) out.println out s1 out.close() out.close out String[] args args static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");
 
        String next() {
            while (!st.hasMoreTokens())
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }
 
        int nextInt() {
            return Integer.parseInt(next());
        }
 
        double nextDouble() {
            return Double.parseDouble(next());
        }
 
        int[] readArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }
 
        long nextLong() {
            return Long.parseLong(next());
        }
 
        public long[] readLongArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++) a[i] = nextLong();
            return a;
        }
    } FastScanner BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringTokenizer st = new StringTokenizer(""); st new StringTokenizer("") String next() {
            while (!st.hasMoreTokens())
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        } next {
            while (!st.hasMoreTokens())
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        } while (!st.hasMoreTokens())
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                } !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                } catch (IOException e) {
                    e.printStackTrace();
                } IOException e {
                    e.printStackTrace();
                } e.printStackTrace() e.printStackTrace e {
                    st = new StringTokenizer(br.readLine());
                } st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st int nextInt() {
            return Integer.parseInt(next());
        } nextInt {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next double nextDouble() {
            return Double.parseDouble(next());
        } nextDouble {
            return Double.parseDouble(next());
        } return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next int[] readArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        } readArray {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        } int[] a = new int[n]; a new int[n] n for (int i = 0; i < n; i++)
                a[i] = nextInt(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i a[i] = nextInt(); a[i] = nextInt() a[i] a i nextInt() nextInt return a; a int n n long nextLong() {
            return Long.parseLong(next());
        } nextLong {
            return Long.parseLong(next());
        } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public long[] readLongArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++) a[i] = nextLong();
            return a;
        } readLongArray {
            long[] a = new long[n];
            for (int i = 0; i < n; i++) a[i] = nextLong();
            return a;
        } long[] a = new long[n]; a new long[n] n for (int i = 0; i < n; i++) a[i] = nextLong(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i a[i] = nextLong(); a[i] = nextLong() a[i] a i nextLong() nextLong return a; a int n n public class Main {
    static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");
 
        String next() {
            while (!st.hasMoreTokens())
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }
 
        int nextInt() {
            return Integer.parseInt(next());
        }
 
        double nextDouble() {
            return Double.parseDouble(next());
        }
 
        int[] readArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }
 
        long nextLong() {
            return Long.parseLong(next());
        }
 
        public long[] readLongArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++) a[i] = nextLong();
            return a;
        }
    }
 
    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
      PrintWriter out = new PrintWriter(System.out);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s1 = Integer.toString(a);
        String s2 = Integer.toString(b);
//        String sc1 = "";
//        String sc2 = "";
        for (int i = 0; i < b - 1; ++i) {
            s1 += s1.charAt(i);
        }
        for (int i = 0; i < a - 1; ++i) {
            s2 += s2.charAt(i);
        }
//        boolean ok = false;
//        for (int i = 0; i < a ; ++i) {
//            for(int j = 0; j <)
//            if (s1.charAt(i) >= s2.charAt(i)) {
//                ok = true;
//            }
//
//
//        }
//        if (ok == true) {
//            System.out.println(s2);
//        } else {
//            System.out.println(s1);
//        }
         if(a >= b){
             out.println(s2);
         }
         else{
             out.println(s1);
         }
      out.close();
    }
} public class Main {
    static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");
 
        String next() {
            while (!st.hasMoreTokens())
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }
 
        int nextInt() {
            return Integer.parseInt(next());
        }
 
        double nextDouble() {
            return Double.parseDouble(next());
        }
 
        int[] readArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }
 
        long nextLong() {
            return Long.parseLong(next());
        }
 
        public long[] readLongArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++) a[i] = nextLong();
            return a;
        }
    }
 
    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
      PrintWriter out = new PrintWriter(System.out);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s1 = Integer.toString(a);
        String s2 = Integer.toString(b);
//        String sc1 = "";
//        String sc2 = "";
        for (int i = 0; i < b - 1; ++i) {
            s1 += s1.charAt(i);
        }
        for (int i = 0; i < a - 1; ++i) {
            s2 += s2.charAt(i);
        }
//        boolean ok = false;
//        for (int i = 0; i < a ; ++i) {
//            for(int j = 0; j <)
//            if (s1.charAt(i) >= s2.charAt(i)) {
//                ok = true;
//            }
//
//
//        }
//        if (ok == true) {
//            System.out.println(s2);
//        } else {
//            System.out.println(s1);
//        }
         if(a >= b){
             out.println(s2);
         }
         else{
             out.println(s1);
         }
      out.close();
    }
} Main
import java.util.*;
import java.io.*;
 
public class Main {
    static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");
 
        String next() {
            while (!st.hasMoreTokens())
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }
 
        int nextInt() {
            return Integer.parseInt(next());
        }
 
        double nextDouble() {
            return Double.parseDouble(next());
        }
 
        int[] readArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }
 
        long nextLong() {
            return Long.parseLong(next());
        }
 
        public long[] readLongArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++) a[i] = nextLong();
            return a;
        }
    }
 
    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
      PrintWriter out = new PrintWriter(System.out);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s1 = Integer.toString(a);
        String s2 = Integer.toString(b);
//        String sc1 = "";
//        String sc2 = "";
        for (int i = 0; i < b - 1; ++i) {
            s1 += s1.charAt(i);
        }
        for (int i = 0; i < a - 1; ++i) {
            s2 += s2.charAt(i);
        }
//        boolean ok = false;
//        for (int i = 0; i < a ; ++i) {
//            for(int j = 0; j <)
//            if (s1.charAt(i) >= s2.charAt(i)) {
//                ok = true;
//            }
//
//
//        }
//        if (ok == true) {
//            System.out.println(s2);
//        } else {
//            System.out.println(s1);
//        }
         if(a >= b){
             out.println(s2);
         }
         else{
             out.println(s1);
         }
      out.close();
    }
}