import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    String aStr = Integer.toString(a);
    int b = sc.nextInt();
    String bStr = Integer.toString(b);

    StringBuilder aResult = new StringBuilder();
    for (int i = 0; i < b; i++) {
      aResult.append(aStr);
    }

    StringBuilder bResult = new StringBuilder();
    for (int i = 0; i < a; i++) {
      bResult.append(bStr);
    }

    List<String> list = new ArrayList<>();
    list.add(aResult.toString());
    list.add(bResult.toString());
    List<String> sortedList = list.stream().sorted().collect(Collectors.toList());

    System.out.println(sortedList.get(0));
  }
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util import java.util.stream.Collectors; Collectors java.util.stream public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    String aStr = Integer.toString(a);
    int b = sc.nextInt();
    String bStr = Integer.toString(b);

    StringBuilder aResult = new StringBuilder();
    for (int i = 0; i < b; i++) {
      aResult.append(aStr);
    }

    StringBuilder bResult = new StringBuilder();
    for (int i = 0; i < a; i++) {
      bResult.append(bStr);
    }

    List<String> list = new ArrayList<>();
    list.add(aResult.toString());
    list.add(bResult.toString());
    List<String> sortedList = list.stream().sorted().collect(Collectors.toList());

    System.out.println(sortedList.get(0));
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    String aStr = Integer.toString(a);
    int b = sc.nextInt();
    String bStr = Integer.toString(b);

    StringBuilder aResult = new StringBuilder();
    for (int i = 0; i < b; i++) {
      aResult.append(aStr);
    }

    StringBuilder bResult = new StringBuilder();
    for (int i = 0; i < a; i++) {
      bResult.append(bStr);
    }

    List<String> list = new ArrayList<>();
    list.add(aResult.toString());
    list.add(bResult.toString());
    List<String> sortedList = list.stream().sorted().collect(Collectors.toList());

    System.out.println(sortedList.get(0));
  } main {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    String aStr = Integer.toString(a);
    int b = sc.nextInt();
    String bStr = Integer.toString(b);

    StringBuilder aResult = new StringBuilder();
    for (int i = 0; i < b; i++) {
      aResult.append(aStr);
    }

    StringBuilder bResult = new StringBuilder();
    for (int i = 0; i < a; i++) {
      bResult.append(bStr);
    }

    List<String> list = new ArrayList<>();
    list.add(aResult.toString());
    list.add(bResult.toString());
    List<String> sortedList = list.stream().sorted().collect(Collectors.toList());

    System.out.println(sortedList.get(0));
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc String aStr = Integer.toString(a); aStr Integer.toString(a) Integer.toString Integer a int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc String bStr = Integer.toString(b); bStr Integer.toString(b) Integer.toString Integer b StringBuilder aResult = new StringBuilder(); aResult new StringBuilder() for (int i = 0; i < b; i++) {
      aResult.append(aStr);
    } int i = 0; int i = 0; i 0 i < b i b i++ i++ i {
      aResult.append(aStr);
    } {
      aResult.append(aStr);
    } aResult.append(aStr) aResult.append aResult aStr StringBuilder bResult = new StringBuilder(); bResult new StringBuilder() for (int i = 0; i < a; i++) {
      bResult.append(bStr);
    } int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
      bResult.append(bStr);
    } {
      bResult.append(bStr);
    } bResult.append(bStr) bResult.append bResult bStr List<String> list = new ArrayList<>(); list new ArrayList<>() list.add(aResult.toString()) list.add list aResult.toString() aResult.toString aResult list.add(bResult.toString()) list.add list bResult.toString() bResult.toString bResult List<String> sortedList = list.stream().sorted().collect(Collectors.toList()); sortedList list.stream().sorted().collect(Collectors.toList()) list.stream().sorted().collect list.stream().sorted() list.stream().sorted list.stream() list.stream list Collectors.toList() Collectors.toList Collectors System.out.println(sortedList.get(0)) System.out.println System.out System System.out sortedList.get(0) sortedList.get sortedList 0 String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    String aStr = Integer.toString(a);
    int b = sc.nextInt();
    String bStr = Integer.toString(b);

    StringBuilder aResult = new StringBuilder();
    for (int i = 0; i < b; i++) {
      aResult.append(aStr);
    }

    StringBuilder bResult = new StringBuilder();
    for (int i = 0; i < a; i++) {
      bResult.append(bStr);
    }

    List<String> list = new ArrayList<>();
    list.add(aResult.toString());
    list.add(bResult.toString());
    List<String> sortedList = list.stream().sorted().collect(Collectors.toList());

    System.out.println(sortedList.get(0));
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    String aStr = Integer.toString(a);
    int b = sc.nextInt();
    String bStr = Integer.toString(b);

    StringBuilder aResult = new StringBuilder();
    for (int i = 0; i < b; i++) {
      aResult.append(aStr);
    }

    StringBuilder bResult = new StringBuilder();
    for (int i = 0; i < a; i++) {
      bResult.append(bStr);
    }

    List<String> list = new ArrayList<>();
    list.add(aResult.toString());
    list.add(bResult.toString());
    List<String> sortedList = list.stream().sorted().collect(Collectors.toList());

    System.out.println(sortedList.get(0));
  }
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    String aStr = Integer.toString(a);
    int b = sc.nextInt();
    String bStr = Integer.toString(b);

    StringBuilder aResult = new StringBuilder();
    for (int i = 0; i < b; i++) {
      aResult.append(aStr);
    }

    StringBuilder bResult = new StringBuilder();
    for (int i = 0; i < a; i++) {
      bResult.append(bStr);
    }

    List<String> list = new ArrayList<>();
    list.add(aResult.toString());
    list.add(bResult.toString());
    List<String> sortedList = list.stream().sorted().collect(Collectors.toList());

    System.out.println(sortedList.get(0));
  }
}