import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        int[] base = {1,11,111,1111,11111,111111,1111111,11111111,111111111};
        
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        
        String x = Integer.toString(a*base[b-1]);
        String y = Integer.toString(b*base[a-1]);
        
        System.out.println(x.compareTo(y)>0?y:x);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        int[] base = {1,11,111,1111,11111,111111,1111111,11111111,111111111};
        
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        
        String x = Integer.toString(a*base[b-1]);
        String y = Integer.toString(b*base[a-1]);
        
        System.out.println(x.compareTo(y)>0?y:x);
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        int[] base = {1,11,111,1111,11111,111111,1111111,11111111,111111111};
        
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        
        String x = Integer.toString(a*base[b-1]);
        String y = Integer.toString(b*base[a-1]);
        
        System.out.println(x.compareTo(y)>0?y:x);
    } main {
        Scanner sc = new Scanner(System.in);
        
        int[] base = {1,11,111,1111,11111,111111,1111111,11111111,111111111};
        
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        
        String x = Integer.toString(a*base[b-1]);
        String y = Integer.toString(b*base[a-1]);
        
        System.out.println(x.compareTo(y)>0?y:x);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[] base = {1,11,111,1111,11111,111111,1111111,11111111,111111111}; base {1,11,111,1111,11111,111111,1111111,11111111,111111111} 1 11 111 1111 11111 111111 1111111 11111111 111111111 int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int b = Integer.parseInt(sc.next()); b Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc String x = Integer.toString(a*base[b-1]); x Integer.toString(a*base[b-1]) Integer.toString Integer a*base[b-1] a base[b-1] base b-1 b 1 String y = Integer.toString(b*base[a-1]); y Integer.toString(b*base[a-1]) Integer.toString Integer b*base[a-1] b base[a-1] base a-1 a 1 System.out.println(x.compareTo(y)>0?y:x) System.out.println System.out System System.out x.compareTo(y)>0?y:x x.compareTo(y)>0 x.compareTo(y) x.compareTo x y 0 y x String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        int[] base = {1,11,111,1111,11111,111111,1111111,11111111,111111111};
        
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        
        String x = Integer.toString(a*base[b-1]);
        String y = Integer.toString(b*base[a-1]);
        
        System.out.println(x.compareTo(y)>0?y:x);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        int[] base = {1,11,111,1111,11111,111111,1111111,11111111,111111111};
        
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        
        String x = Integer.toString(a*base[b-1]);
        String y = Integer.toString(b*base[a-1]);
        
        System.out.println(x.compareTo(y)>0?y:x);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        int[] base = {1,11,111,1111,11111,111111,1111111,11111111,111111111};
        
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        
        String x = Integer.toString(a*base[b-1]);
        String y = Integer.toString(b*base[a-1]);
        
        System.out.println(x.compareTo(y)>0?y:x);
    }
}