import java.util.*;

public class Main {
  public static void main(final String[] args) {
    final Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    sc.close();

    String aw = "";
    for(int i=0;i<B;++i){
      aw += String.valueOf(A);
    }
    String bw = "";
    for(int i=0;i<A;++i){
      bw += String.valueOf(B);
    }

    if (aw.compareTo(bw) < 0) {
      System.out.println(aw);
    } else {
      System.out.println(bw);
    }
  }
} import java.util.*; util.* java public class Main {
  public static void main(final String[] args) {
    final Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    sc.close();

    String aw = "";
    for(int i=0;i<B;++i){
      aw += String.valueOf(A);
    }
    String bw = "";
    for(int i=0;i<A;++i){
      bw += String.valueOf(B);
    }

    if (aw.compareTo(bw) < 0) {
      System.out.println(aw);
    } else {
      System.out.println(bw);
    }
  }
} Main public static void main(final String[] args) {
    final Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    sc.close();

    String aw = "";
    for(int i=0;i<B;++i){
      aw += String.valueOf(A);
    }
    String bw = "";
    for(int i=0;i<A;++i){
      bw += String.valueOf(B);
    }

    if (aw.compareTo(bw) < 0) {
      System.out.println(aw);
    } else {
      System.out.println(bw);
    }
  } main {
    final Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    sc.close();

    String aw = "";
    for(int i=0;i<B;++i){
      aw += String.valueOf(A);
    }
    String bw = "";
    for(int i=0;i<A;++i){
      bw += String.valueOf(B);
    }

    if (aw.compareTo(bw) < 0) {
      System.out.println(aw);
    } else {
      System.out.println(bw);
    }
  } final 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 sc.close() sc.close sc String aw = ""; aw "" for(int i=0;i<B;++i){
      aw += String.valueOf(A);
    } int i=0; int i=0; i 0 i<B i B ++i ++i i {
      aw += String.valueOf(A);
    } {
      aw += String.valueOf(A);
    } aw += String.valueOf(A) aw String.valueOf(A) String.valueOf String A String bw = ""; bw "" for(int i=0;i<A;++i){
      bw += String.valueOf(B);
    } int i=0; int i=0; i 0 i<A i A ++i ++i i {
      bw += String.valueOf(B);
    } {
      bw += String.valueOf(B);
    } bw += String.valueOf(B) bw String.valueOf(B) String.valueOf String B if (aw.compareTo(bw) < 0) {
      System.out.println(aw);
    } else {
      System.out.println(bw);
    } aw.compareTo(bw) < 0 aw.compareTo(bw) aw.compareTo aw bw 0 {
      System.out.println(aw);
    } System.out.println(aw) System.out.println System.out System System.out aw {
      System.out.println(bw);
    } System.out.println(bw) System.out.println System.out System System.out bw final String[] args args public class Main {
  public static void main(final String[] args) {
    final Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    sc.close();

    String aw = "";
    for(int i=0;i<B;++i){
      aw += String.valueOf(A);
    }
    String bw = "";
    for(int i=0;i<A;++i){
      bw += String.valueOf(B);
    }

    if (aw.compareTo(bw) < 0) {
      System.out.println(aw);
    } else {
      System.out.println(bw);
    }
  }
} public class Main {
  public static void main(final String[] args) {
    final Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    sc.close();

    String aw = "";
    for(int i=0;i<B;++i){
      aw += String.valueOf(A);
    }
    String bw = "";
    for(int i=0;i<A;++i){
      bw += String.valueOf(B);
    }

    if (aw.compareTo(bw) < 0) {
      System.out.println(aw);
    } else {
      System.out.println(bw);
    }
  }
} Main
import java.util.*;

public class Main {
  public static void main(final String[] args) {
    final Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    sc.close();

    String aw = "";
    for(int i=0;i<B;++i){
      aw += String.valueOf(A);
    }
    String bw = "";
    for(int i=0;i<A;++i){
      bw += String.valueOf(B);
    }

    if (aw.compareTo(bw) < 0) {
      System.out.println(aw);
    } else {
      System.out.println(bw);
    }
  }
}
