import java.util.*;
 
import java.io.*;
 
public class Main{
    
	public static void main(String[] $){
		Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int M = s.nextInt();

        String a = "";
        String b = "";
        for(int i = 0; i < M; i++){
            a = a + String.valueOf(N);
        }
        for(int i = 0; i < N; i++){
            b = b + String.valueOf(M);
        }
        if(a.compareTo(b) >= 0){
            System.out.println(b);
        }else{
            System.out.println(a);
        }
        
	}
}  import java.util.*; util.* java import java.io.*; io.* java public class Main{
    
	public static void main(String[] $){
		Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int M = s.nextInt();

        String a = "";
        String b = "";
        for(int i = 0; i < M; i++){
            a = a + String.valueOf(N);
        }
        for(int i = 0; i < N; i++){
            b = b + String.valueOf(M);
        }
        if(a.compareTo(b) >= 0){
            System.out.println(b);
        }else{
            System.out.println(a);
        }
        
	}
} Main public static void main(String[] $){
		Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int M = s.nextInt();

        String a = "";
        String b = "";
        for(int i = 0; i < M; i++){
            a = a + String.valueOf(N);
        }
        for(int i = 0; i < N; i++){
            b = b + String.valueOf(M);
        }
        if(a.compareTo(b) >= 0){
            System.out.println(b);
        }else{
            System.out.println(a);
        }
        
	} main {
		Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int M = s.nextInt();

        String a = "";
        String b = "";
        for(int i = 0; i < M; i++){
            a = a + String.valueOf(N);
        }
        for(int i = 0; i < N; i++){
            b = b + String.valueOf(M);
        }
        if(a.compareTo(b) >= 0){
            System.out.println(b);
        }else{
            System.out.println(a);
        }
        
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) int N = s.nextInt(); N s.nextInt() s.nextInt s int M = s.nextInt(); M s.nextInt() s.nextInt s String a = ""; a "" String b = ""; b "" for(int i = 0; i < M; i++){
            a = a + String.valueOf(N);
        } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
            a = a + String.valueOf(N);
        } {
            a = a + String.valueOf(N);
        } a = a + String.valueOf(N) a a + String.valueOf(N) a String.valueOf(N) String.valueOf String N for(int i = 0; i < N; i++){
            b = b + String.valueOf(M);
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            b = b + String.valueOf(M);
        } {
            b = b + String.valueOf(M);
        } b = b + String.valueOf(M) b b + String.valueOf(M) b String.valueOf(M) String.valueOf String M if(a.compareTo(b) >= 0){
            System.out.println(b);
        }else{
            System.out.println(a);
        } a.compareTo(b) >= 0 a.compareTo(b) a.compareTo a b 0 {
            System.out.println(b);
        } System.out.println(b) System.out.println System.out System System.out b {
            System.out.println(a);
        } System.out.println(a) System.out.println System.out System System.out a String[] $ $ public class Main{
    
	public static void main(String[] $){
		Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int M = s.nextInt();

        String a = "";
        String b = "";
        for(int i = 0; i < M; i++){
            a = a + String.valueOf(N);
        }
        for(int i = 0; i < N; i++){
            b = b + String.valueOf(M);
        }
        if(a.compareTo(b) >= 0){
            System.out.println(b);
        }else{
            System.out.println(a);
        }
        
	}
} public class Main{
    
	public static void main(String[] $){
		Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int M = s.nextInt();

        String a = "";
        String b = "";
        for(int i = 0; i < M; i++){
            a = a + String.valueOf(N);
        }
        for(int i = 0; i < N; i++){
            b = b + String.valueOf(M);
        }
        if(a.compareTo(b) >= 0){
            System.out.println(b);
        }else{
            System.out.println(a);
        }
        
	}
} Main
import java.util.*;
 
import java.io.*;
 
public class Main{
    
	public static void main(String[] $){
		Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int M = s.nextInt();

        String a = "";
        String b = "";
        for(int i = 0; i < M; i++){
            a = a + String.valueOf(N);
        }
        for(int i = 0; i < N; i++){
            b = b + String.valueOf(M);
        }
        if(a.compareTo(b) >= 0){
            System.out.println(b);
        }else{
            System.out.println(a);
        }
        
	}
} 