import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    String aa,bb;
    aa = bb = "";
    for(int i = 0;i < b; i++){
      aa += a;
  }
    for(int i = 0;i < a; i++){
      bb += b;
    }
    System.out.println(aa.compareTo(bb) > 0 ? bb : aa);
  }
    
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    String aa,bb;
    aa = bb = "";
    for(int i = 0;i < b; i++){
      aa += a;
  }
    for(int i = 0;i < a; i++){
      bb += b;
    }
    System.out.println(aa.compareTo(bb) > 0 ? bb : aa);
  }
    
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    String aa,bb;
    aa = bb = "";
    for(int i = 0;i < b; i++){
      aa += a;
  }
    for(int i = 0;i < a; i++){
      bb += b;
    }
    System.out.println(aa.compareTo(bb) > 0 ? bb : aa);
  } main {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    String aa,bb;
    aa = bb = "";
    for(int i = 0;i < b; i++){
      aa += a;
  }
    for(int i = 0;i < a; i++){
      bb += b;
    }
    System.out.println(aa.compareTo(bb) > 0 ? bb : aa);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc String aa aa bb; bb aa = bb = "" aa bb = "" bb "" for(int i = 0;i < b; i++){
      aa += a;
  } int i = 0; int i = 0; i 0 i < b i b i++ i++ i {
      aa += a;
  } {
      aa += a;
  } aa += a aa a for(int i = 0;i < a; i++){
      bb += b;
    } int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
      bb += b;
    } {
      bb += b;
    } bb += b bb b System.out.println(aa.compareTo(bb) > 0 ? bb : aa) System.out.println System.out System System.out aa.compareTo(bb) > 0 ? bb : aa aa.compareTo(bb) > 0 aa.compareTo(bb) aa.compareTo aa bb 0 bb aa String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    String aa,bb;
    aa = bb = "";
    for(int i = 0;i < b; i++){
      aa += a;
  }
    for(int i = 0;i < a; i++){
      bb += b;
    }
    System.out.println(aa.compareTo(bb) > 0 ? bb : aa);
  }
    
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    String aa,bb;
    aa = bb = "";
    for(int i = 0;i < b; i++){
      aa += a;
  }
    for(int i = 0;i < a; i++){
      bb += b;
    }
    System.out.println(aa.compareTo(bb) > 0 ? bb : aa);
  }
    
} Main
import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    String aa,bb;
    aa = bb = "";
    for(int i = 0;i < b; i++){
      aa += a;
  }
    for(int i = 0;i < a; i++){
      bb += b;
    }
    System.out.println(aa.compareTo(bb) > 0 ? bb : aa);
  }
    
}