import java.math.*;
import java.util.*;

	public class Main {

		public static void main(String[] args) {

			Scanner sc = new Scanner(System.in);
			int a = sc.nextInt();
			int b = sc.nextInt();
			String ab ="" ;
			String ba ="" ;
			
			for(int i=0;i<b;i++) {
				ab +=a;
			}
			
			for(int i=0;i<a;i++) {
				ba +=b;
			}
			
			if(ab.compareTo(ba)>=0) {
				System.out.println(ba);
			}
			else {
				System.out.println(ab);
			}
			
		}

	} import java.math.*; math.* java import java.util.*; util.* java public class Main {

		public static void main(String[] args) {

			Scanner sc = new Scanner(System.in);
			int a = sc.nextInt();
			int b = sc.nextInt();
			String ab ="" ;
			String ba ="" ;
			
			for(int i=0;i<b;i++) {
				ab +=a;
			}
			
			for(int i=0;i<a;i++) {
				ba +=b;
			}
			
			if(ab.compareTo(ba)>=0) {
				System.out.println(ba);
			}
			else {
				System.out.println(ab);
			}
			
		}

	} Main public static void main(String[] args) {

			Scanner sc = new Scanner(System.in);
			int a = sc.nextInt();
			int b = sc.nextInt();
			String ab ="" ;
			String ba ="" ;
			
			for(int i=0;i<b;i++) {
				ab +=a;
			}
			
			for(int i=0;i<a;i++) {
				ba +=b;
			}
			
			if(ab.compareTo(ba)>=0) {
				System.out.println(ba);
			}
			else {
				System.out.println(ab);
			}
			
		} main {

			Scanner sc = new Scanner(System.in);
			int a = sc.nextInt();
			int b = sc.nextInt();
			String ab ="" ;
			String ba ="" ;
			
			for(int i=0;i<b;i++) {
				ab +=a;
			}
			
			for(int i=0;i<a;i++) {
				ba +=b;
			}
			
			if(ab.compareTo(ba)>=0) {
				System.out.println(ba);
			}
			else {
				System.out.println(ab);
			}
			
		} 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 String ab ="" ; ab "" String ba ="" ; ba "" for(int i=0;i<b;i++) {
				ab +=a;
			} int i=0; int i=0; i 0 i<b i b i++ i++ i {
				ab +=a;
			} {
				ab +=a;
			} ab +=a ab a for(int i=0;i<a;i++) {
				ba +=b;
			} int i=0; int i=0; i 0 i<a i a i++ i++ i {
				ba +=b;
			} {
				ba +=b;
			} ba +=b ba b if(ab.compareTo(ba)>=0) {
				System.out.println(ba);
			}
			else {
				System.out.println(ab);
			} ab.compareTo(ba)>=0 ab.compareTo(ba) ab.compareTo ab ba 0 {
				System.out.println(ba);
			} System.out.println(ba) System.out.println System.out System System.out ba {
				System.out.println(ab);
			} System.out.println(ab) System.out.println System.out System System.out ab String[] args args public class Main {

		public static void main(String[] args) {

			Scanner sc = new Scanner(System.in);
			int a = sc.nextInt();
			int b = sc.nextInt();
			String ab ="" ;
			String ba ="" ;
			
			for(int i=0;i<b;i++) {
				ab +=a;
			}
			
			for(int i=0;i<a;i++) {
				ba +=b;
			}
			
			if(ab.compareTo(ba)>=0) {
				System.out.println(ba);
			}
			else {
				System.out.println(ab);
			}
			
		}

	} public class Main {

		public static void main(String[] args) {

			Scanner sc = new Scanner(System.in);
			int a = sc.nextInt();
			int b = sc.nextInt();
			String ab ="" ;
			String ba ="" ;
			
			for(int i=0;i<b;i++) {
				ab +=a;
			}
			
			for(int i=0;i<a;i++) {
				ba +=b;
			}
			
			if(ab.compareTo(ba)>=0) {
				System.out.println(ba);
			}
			else {
				System.out.println(ab);
			}
			
		}

	} Main
import java.math.*;
import java.util.*;

	public class Main {

		public static void main(String[] args) {

			Scanner sc = new Scanner(System.in);
			int a = sc.nextInt();
			int b = sc.nextInt();
			String ab ="" ;
			String ba ="" ;
			
			for(int i=0;i<b;i++) {
				ab +=a;
			}
			
			for(int i=0;i<a;i++) {
				ba +=b;
			}
			
			if(ab.compareTo(ba)>=0) {
				System.out.println(ba);
			}
			else {
				System.out.println(ab);
			}
			
		}

	}