import java.util.*;
public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int firstNum = scanner.nextInt();
    int secondNum = scanner.nextInt();
    int sumOne = firstNum;
    for(int i=1; i<secondNum; i++){
      sumOne = sumOne * 10 + firstNum;
    }
    int sumTwo = secondNum;
    for(int i=1; i<firstNum; i++){
      sumTwo = sumTwo * 10 + secondNum;
    }
    if(sumOne > sumTwo) System.out.println(sumOne);
    else System.out.println(sumTwo);
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int firstNum = scanner.nextInt();
    int secondNum = scanner.nextInt();
    int sumOne = firstNum;
    for(int i=1; i<secondNum; i++){
      sumOne = sumOne * 10 + firstNum;
    }
    int sumTwo = secondNum;
    for(int i=1; i<firstNum; i++){
      sumTwo = sumTwo * 10 + secondNum;
    }
    if(sumOne > sumTwo) System.out.println(sumOne);
    else System.out.println(sumTwo);
  }
} Main public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int firstNum = scanner.nextInt();
    int secondNum = scanner.nextInt();
    int sumOne = firstNum;
    for(int i=1; i<secondNum; i++){
      sumOne = sumOne * 10 + firstNum;
    }
    int sumTwo = secondNum;
    for(int i=1; i<firstNum; i++){
      sumTwo = sumTwo * 10 + secondNum;
    }
    if(sumOne > sumTwo) System.out.println(sumOne);
    else System.out.println(sumTwo);
  } main {
    Scanner scanner = new Scanner(System.in);
    int firstNum = scanner.nextInt();
    int secondNum = scanner.nextInt();
    int sumOne = firstNum;
    for(int i=1; i<secondNum; i++){
      sumOne = sumOne * 10 + firstNum;
    }
    int sumTwo = secondNum;
    for(int i=1; i<firstNum; i++){
      sumTwo = sumTwo * 10 + secondNum;
    }
    if(sumOne > sumTwo) System.out.println(sumOne);
    else System.out.println(sumTwo);
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int firstNum = scanner.nextInt(); firstNum scanner.nextInt() scanner.nextInt scanner int secondNum = scanner.nextInt(); secondNum scanner.nextInt() scanner.nextInt scanner int sumOne = firstNum; sumOne firstNum for(int i=1; i<secondNum; i++){
      sumOne = sumOne * 10 + firstNum;
    } int i=1; int i=1; i 1 i<secondNum i secondNum i++ i++ i {
      sumOne = sumOne * 10 + firstNum;
    } {
      sumOne = sumOne * 10 + firstNum;
    } sumOne = sumOne * 10 + firstNum sumOne sumOne * 10 + firstNum sumOne * 10 sumOne 10 firstNum int sumTwo = secondNum; sumTwo secondNum for(int i=1; i<firstNum; i++){
      sumTwo = sumTwo * 10 + secondNum;
    } int i=1; int i=1; i 1 i<firstNum i firstNum i++ i++ i {
      sumTwo = sumTwo * 10 + secondNum;
    } {
      sumTwo = sumTwo * 10 + secondNum;
    } sumTwo = sumTwo * 10 + secondNum sumTwo sumTwo * 10 + secondNum sumTwo * 10 sumTwo 10 secondNum if(sumOne > sumTwo) System.out.println(sumOne);
    else System.out.println(sumTwo); sumOne > sumTwo sumOne sumTwo System.out.println(sumOne) System.out.println System.out System System.out sumOne System.out.println(sumTwo) System.out.println System.out System System.out sumTwo String[] args args public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int firstNum = scanner.nextInt();
    int secondNum = scanner.nextInt();
    int sumOne = firstNum;
    for(int i=1; i<secondNum; i++){
      sumOne = sumOne * 10 + firstNum;
    }
    int sumTwo = secondNum;
    for(int i=1; i<firstNum; i++){
      sumTwo = sumTwo * 10 + secondNum;
    }
    if(sumOne > sumTwo) System.out.println(sumOne);
    else System.out.println(sumTwo);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int firstNum = scanner.nextInt();
    int secondNum = scanner.nextInt();
    int sumOne = firstNum;
    for(int i=1; i<secondNum; i++){
      sumOne = sumOne * 10 + firstNum;
    }
    int sumTwo = secondNum;
    for(int i=1; i<firstNum; i++){
      sumTwo = sumTwo * 10 + secondNum;
    }
    if(sumOne > sumTwo) System.out.println(sumOne);
    else System.out.println(sumTwo);
  }
} Main
import java.util.*;
public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int firstNum = scanner.nextInt();
    int secondNum = scanner.nextInt();
    int sumOne = firstNum;
    for(int i=1; i<secondNum; i++){
      sumOne = sumOne * 10 + firstNum;
    }
    int sumTwo = secondNum;
    for(int i=1; i<firstNum; i++){
      sumTwo = sumTwo * 10 + secondNum;
    }
    if(sumOne > sumTwo) System.out.println(sumOne);
    else System.out.println(sumTwo);
  }
}