import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
      int N = sc.nextInt(); // 合計値
      int S = sc.nextInt();

      StringBuilder val = new StringBuilder();
      for(int count = 0; count < S; count++) {
          String cntval = Integer.toString(N);
          val.append(cntval);
      }
      String NN = new String(val);
      StringBuilder val2 = new StringBuilder();
      for(int count = 0; count < N; count++) {
          String cntval = Integer.toString(S);
          val2.append(cntval);
      }
      String SS = new String(val2);
      
      if(NN.compareTo(SS) > 0){
      	System.out.println(SS);
      } else {
      	System.out.println(NN);
      }
   }
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
      int N = sc.nextInt(); // 合計値
      int S = sc.nextInt();

      StringBuilder val = new StringBuilder();
      for(int count = 0; count < S; count++) {
          String cntval = Integer.toString(N);
          val.append(cntval);
      }
      String NN = new String(val);
      StringBuilder val2 = new StringBuilder();
      for(int count = 0; count < N; count++) {
          String cntval = Integer.toString(S);
          val2.append(cntval);
      }
      String SS = new String(val2);
      
      if(NN.compareTo(SS) > 0){
      	System.out.println(SS);
      } else {
      	System.out.println(NN);
      }
   }
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
      int N = sc.nextInt(); // 合計値
      int S = sc.nextInt();

      StringBuilder val = new StringBuilder();
      for(int count = 0; count < S; count++) {
          String cntval = Integer.toString(N);
          val.append(cntval);
      }
      String NN = new String(val);
      StringBuilder val2 = new StringBuilder();
      for(int count = 0; count < N; count++) {
          String cntval = Integer.toString(S);
          val2.append(cntval);
      }
      String SS = new String(val2);
      
      if(NN.compareTo(SS) > 0){
      	System.out.println(SS);
      } else {
      	System.out.println(NN);
      }
   } main {
		Scanner sc = new Scanner(System.in);
		// 整数の入力
      int N = sc.nextInt(); // 合計値
      int S = sc.nextInt();

      StringBuilder val = new StringBuilder();
      for(int count = 0; count < S; count++) {
          String cntval = Integer.toString(N);
          val.append(cntval);
      }
      String NN = new String(val);
      StringBuilder val2 = new StringBuilder();
      for(int count = 0; count < N; count++) {
          String cntval = Integer.toString(S);
          val2.append(cntval);
      }
      String SS = new String(val2);
      
      if(NN.compareTo(SS) > 0){
      	System.out.println(SS);
      } else {
      	System.out.println(NN);
      }
   } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int S = sc.nextInt(); S sc.nextInt() sc.nextInt sc StringBuilder val = new StringBuilder(); val new StringBuilder() for(int count = 0; count < S; count++) {
          String cntval = Integer.toString(N);
          val.append(cntval);
      } int count = 0; int count = 0; count 0 count < S count S count++ count++ count {
          String cntval = Integer.toString(N);
          val.append(cntval);
      } {
          String cntval = Integer.toString(N);
          val.append(cntval);
      } String cntval = Integer.toString(N); cntval Integer.toString(N) Integer.toString Integer N val.append(cntval) val.append val cntval String NN = new String(val); NN new String(val) StringBuilder val2 = new StringBuilder(); val2 new StringBuilder() for(int count = 0; count < N; count++) {
          String cntval = Integer.toString(S);
          val2.append(cntval);
      } int count = 0; int count = 0; count 0 count < N count N count++ count++ count {
          String cntval = Integer.toString(S);
          val2.append(cntval);
      } {
          String cntval = Integer.toString(S);
          val2.append(cntval);
      } String cntval = Integer.toString(S); cntval Integer.toString(S) Integer.toString Integer S val2.append(cntval) val2.append val2 cntval String SS = new String(val2); SS new String(val2) if(NN.compareTo(SS) > 0){
      	System.out.println(SS);
      } else {
      	System.out.println(NN);
      } NN.compareTo(SS) > 0 NN.compareTo(SS) NN.compareTo NN SS 0 {
      	System.out.println(SS);
      } System.out.println(SS) System.out.println System.out System System.out SS {
      	System.out.println(NN);
      } System.out.println(NN) System.out.println System.out System System.out NN String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
      int N = sc.nextInt(); // 合計値
      int S = sc.nextInt();

      StringBuilder val = new StringBuilder();
      for(int count = 0; count < S; count++) {
          String cntval = Integer.toString(N);
          val.append(cntval);
      }
      String NN = new String(val);
      StringBuilder val2 = new StringBuilder();
      for(int count = 0; count < N; count++) {
          String cntval = Integer.toString(S);
          val2.append(cntval);
      }
      String SS = new String(val2);
      
      if(NN.compareTo(SS) > 0){
      	System.out.println(SS);
      } else {
      	System.out.println(NN);
      }
   }
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
      int N = sc.nextInt(); // 合計値
      int S = sc.nextInt();

      StringBuilder val = new StringBuilder();
      for(int count = 0; count < S; count++) {
          String cntval = Integer.toString(N);
          val.append(cntval);
      }
      String NN = new String(val);
      StringBuilder val2 = new StringBuilder();
      for(int count = 0; count < N; count++) {
          String cntval = Integer.toString(S);
          val2.append(cntval);
      }
      String SS = new String(val2);
      
      if(NN.compareTo(SS) > 0){
      	System.out.println(SS);
      } else {
      	System.out.println(NN);
      }
   }
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
      int N = sc.nextInt(); // 合計値
      int S = sc.nextInt();

      StringBuilder val = new StringBuilder();
      for(int count = 0; count < S; count++) {
          String cntval = Integer.toString(N);
          val.append(cntval);
      }
      String NN = new String(val);
      StringBuilder val2 = new StringBuilder();
      for(int count = 0; count < N; count++) {
          String cntval = Integer.toString(S);
          val2.append(cntval);
      }
      String SS = new String(val2);
      
      if(NN.compareTo(SS) > 0){
      	System.out.println(SS);
      } else {
      	System.out.println(NN);
      }
   }
}
