import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    String b = sc.next();
    int A = Integer.parseInt(a);
    int B = Integer.parseInt(b);
    String ax = "";
    String bx = "";
    for (int i=0; i<B; i++) {
      ax += a;
    }
    for (int i=0; i<A; i++) {
      bx += b;
    }
    if (ax.compareTo(bx) < 0) {
      System.out.println(ax);
    } else {
      System.out.println(bx);
    }
  }
}
     import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    String b = sc.next();
    int A = Integer.parseInt(a);
    int B = Integer.parseInt(b);
    String ax = "";
    String bx = "";
    for (int i=0; i<B; i++) {
      ax += a;
    }
    for (int i=0; i<A; i++) {
      bx += b;
    }
    if (ax.compareTo(bx) < 0) {
      System.out.println(ax);
    } else {
      System.out.println(bx);
    }
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    String b = sc.next();
    int A = Integer.parseInt(a);
    int B = Integer.parseInt(b);
    String ax = "";
    String bx = "";
    for (int i=0; i<B; i++) {
      ax += a;
    }
    for (int i=0; i<A; i++) {
      bx += b;
    }
    if (ax.compareTo(bx) < 0) {
      System.out.println(ax);
    } else {
      System.out.println(bx);
    }
  } main {
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    String b = sc.next();
    int A = Integer.parseInt(a);
    int B = Integer.parseInt(b);
    String ax = "";
    String bx = "";
    for (int i=0; i<B; i++) {
      ax += a;
    }
    for (int i=0; i<A; i++) {
      bx += b;
    }
    if (ax.compareTo(bx) < 0) {
      System.out.println(ax);
    } else {
      System.out.println(bx);
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String a = sc.next(); a sc.next() sc.next sc String b = sc.next(); b sc.next() sc.next sc int A = Integer.parseInt(a); A Integer.parseInt(a) Integer.parseInt Integer a int B = Integer.parseInt(b); B Integer.parseInt(b) Integer.parseInt Integer b String ax = ""; ax "" String bx = ""; bx "" for (int i=0; i<B; i++) {
      ax += a;
    } int i=0; int i=0; i 0 i<B i B i++ i++ i {
      ax += a;
    } {
      ax += a;
    } ax += a ax a for (int i=0; i<A; i++) {
      bx += b;
    } int i=0; int i=0; i 0 i<A i A i++ i++ i {
      bx += b;
    } {
      bx += b;
    } bx += b bx b if (ax.compareTo(bx) < 0) {
      System.out.println(ax);
    } else {
      System.out.println(bx);
    } ax.compareTo(bx) < 0 ax.compareTo(bx) ax.compareTo ax bx 0 {
      System.out.println(ax);
    } System.out.println(ax) System.out.println System.out System System.out ax {
      System.out.println(bx);
    } System.out.println(bx) System.out.println System.out System System.out bx String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    String b = sc.next();
    int A = Integer.parseInt(a);
    int B = Integer.parseInt(b);
    String ax = "";
    String bx = "";
    for (int i=0; i<B; i++) {
      ax += a;
    }
    for (int i=0; i<A; i++) {
      bx += b;
    }
    if (ax.compareTo(bx) < 0) {
      System.out.println(ax);
    } else {
      System.out.println(bx);
    }
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    String b = sc.next();
    int A = Integer.parseInt(a);
    int B = Integer.parseInt(b);
    String ax = "";
    String bx = "";
    for (int i=0; i<B; i++) {
      ax += a;
    }
    for (int i=0; i<A; i++) {
      bx += b;
    }
    if (ax.compareTo(bx) < 0) {
      System.out.println(ax);
    } else {
      System.out.println(bx);
    }
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    String b = sc.next();
    int A = Integer.parseInt(a);
    int B = Integer.parseInt(b);
    String ax = "";
    String bx = "";
    for (int i=0; i<B; i++) {
      ax += a;
    }
    for (int i=0; i<A; i++) {
      bx += b;
    }
    if (ax.compareTo(bx) < 0) {
      System.out.println(ax);
    } else {
      System.out.println(bx);
    }
  }
}
    