import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		String x="";
		String y="";
		
		for(int i=0; i<n;i++){
			x = x + "" + m;
			}
		for(int o=0; o<m;o++){
			y = y + "" + n;
			}
		if(x.compareTo(y) < 0){
			System.out.println(x);
			}else if(y.compareTo(x) < 0){
				System.out.println(y);
			}else if(y.compareTo(x) == 0){
				System.out.println(y);
			}
		
		
	}
} 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 m = sc.nextInt();
		String x="";
		String y="";
		
		for(int i=0; i<n;i++){
			x = x + "" + m;
			}
		for(int o=0; o<m;o++){
			y = y + "" + n;
			}
		if(x.compareTo(y) < 0){
			System.out.println(x);
			}else if(y.compareTo(x) < 0){
				System.out.println(y);
			}else if(y.compareTo(x) == 0){
				System.out.println(y);
			}
		
		
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		String x="";
		String y="";
		
		for(int i=0; i<n;i++){
			x = x + "" + m;
			}
		for(int o=0; o<m;o++){
			y = y + "" + n;
			}
		if(x.compareTo(y) < 0){
			System.out.println(x);
			}else if(y.compareTo(x) < 0){
				System.out.println(y);
			}else if(y.compareTo(x) == 0){
				System.out.println(y);
			}
		
		
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		String x="";
		String y="";
		
		for(int i=0; i<n;i++){
			x = x + "" + m;
			}
		for(int o=0; o<m;o++){
			y = y + "" + n;
			}
		if(x.compareTo(y) < 0){
			System.out.println(x);
			}else if(y.compareTo(x) < 0){
				System.out.println(y);
			}else if(y.compareTo(x) == 0){
				System.out.println(y);
			}
		
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc String x=""; x "" String y=""; y "" for(int i=0; i<n;i++){
			x = x + "" + m;
			} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			x = x + "" + m;
			} {
			x = x + "" + m;
			} x = x + "" + m x x + "" + m x + "" + m x "" m for(int o=0; o<m;o++){
			y = y + "" + n;
			} int o=0; int o=0; o 0 o<m o m o++ o++ o {
			y = y + "" + n;
			} {
			y = y + "" + n;
			} y = y + "" + n y y + "" + n y + "" + n y "" n if(x.compareTo(y) < 0){
			System.out.println(x);
			}else if(y.compareTo(x) < 0){
				System.out.println(y);
			}else if(y.compareTo(x) == 0){
				System.out.println(y);
			} x.compareTo(y) < 0 x.compareTo(y) x.compareTo x y 0 {
			System.out.println(x);
			} System.out.println(x) System.out.println System.out System System.out x if(y.compareTo(x) < 0){
				System.out.println(y);
			}else if(y.compareTo(x) == 0){
				System.out.println(y);
			} y.compareTo(x) < 0 y.compareTo(x) y.compareTo y x 0 {
				System.out.println(y);
			} System.out.println(y) System.out.println System.out System System.out y if(y.compareTo(x) == 0){
				System.out.println(y);
			} y.compareTo(x) == 0 y.compareTo(x) y.compareTo y x 0 {
				System.out.println(y);
			} System.out.println(y) System.out.println System.out System System.out y String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		String x="";
		String y="";
		
		for(int i=0; i<n;i++){
			x = x + "" + m;
			}
		for(int o=0; o<m;o++){
			y = y + "" + n;
			}
		if(x.compareTo(y) < 0){
			System.out.println(x);
			}else if(y.compareTo(x) < 0){
				System.out.println(y);
			}else if(y.compareTo(x) == 0){
				System.out.println(y);
			}
		
		
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		String x="";
		String y="";
		
		for(int i=0; i<n;i++){
			x = x + "" + m;
			}
		for(int o=0; o<m;o++){
			y = y + "" + n;
			}
		if(x.compareTo(y) < 0){
			System.out.println(x);
			}else if(y.compareTo(x) < 0){
				System.out.println(y);
			}else if(y.compareTo(x) == 0){
				System.out.println(y);
			}
		
		
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		String x="";
		String y="";
		
		for(int i=0; i<n;i++){
			x = x + "" + m;
			}
		for(int o=0; o<m;o++){
			y = y + "" + n;
			}
		if(x.compareTo(y) < 0){
			System.out.println(x);
			}else if(y.compareTo(x) < 0){
				System.out.println(y);
			}else if(y.compareTo(x) == 0){
				System.out.println(y);
			}
		
		
	}
}