import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String a = scan.next();
		String b = scan.next();

		 StringBuilder asb = new StringBuilder();

		 // a * b
		 for(int i= 0; i< Integer.parseInt(b); i++) {
			 asb.append(a);
		 }

		 StringBuilder bsb = new StringBuilder();

		 // b * a
		 for(int i= 0; i< Integer.parseInt(a); i++) {
			 bsb.append(b);
		 }

		 //System.out.println(asb.toString());
		 //System.out.println(asb.toString().compareTo(bsb.toString()));

		 if(asb.toString().compareTo(bsb.toString()) <= -1) {
			 System.out.println(asb.toString());
		 }else{
			 System.out.println(bsb.toString());
		 }


	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String a = scan.next();
		String b = scan.next();

		 StringBuilder asb = new StringBuilder();

		 // a * b
		 for(int i= 0; i< Integer.parseInt(b); i++) {
			 asb.append(a);
		 }

		 StringBuilder bsb = new StringBuilder();

		 // b * a
		 for(int i= 0; i< Integer.parseInt(a); i++) {
			 bsb.append(b);
		 }

		 //System.out.println(asb.toString());
		 //System.out.println(asb.toString().compareTo(bsb.toString()));

		 if(asb.toString().compareTo(bsb.toString()) <= -1) {
			 System.out.println(asb.toString());
		 }else{
			 System.out.println(bsb.toString());
		 }


	}

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

		Scanner scan = new Scanner(System.in);

		String a = scan.next();
		String b = scan.next();

		 StringBuilder asb = new StringBuilder();

		 // a * b
		 for(int i= 0; i< Integer.parseInt(b); i++) {
			 asb.append(a);
		 }

		 StringBuilder bsb = new StringBuilder();

		 // b * a
		 for(int i= 0; i< Integer.parseInt(a); i++) {
			 bsb.append(b);
		 }

		 //System.out.println(asb.toString());
		 //System.out.println(asb.toString().compareTo(bsb.toString()));

		 if(asb.toString().compareTo(bsb.toString()) <= -1) {
			 System.out.println(asb.toString());
		 }else{
			 System.out.println(bsb.toString());
		 }


	} main {

		Scanner scan = new Scanner(System.in);

		String a = scan.next();
		String b = scan.next();

		 StringBuilder asb = new StringBuilder();

		 // a * b
		 for(int i= 0; i< Integer.parseInt(b); i++) {
			 asb.append(a);
		 }

		 StringBuilder bsb = new StringBuilder();

		 // b * a
		 for(int i= 0; i< Integer.parseInt(a); i++) {
			 bsb.append(b);
		 }

		 //System.out.println(asb.toString());
		 //System.out.println(asb.toString().compareTo(bsb.toString()));

		 if(asb.toString().compareTo(bsb.toString()) <= -1) {
			 System.out.println(asb.toString());
		 }else{
			 System.out.println(bsb.toString());
		 }


	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String a = scan.next(); a scan.next() scan.next scan String b = scan.next(); b scan.next() scan.next scan StringBuilder asb = new StringBuilder(); asb new StringBuilder() for(int i= 0; i< Integer.parseInt(b); i++) {
			 asb.append(a);
		 } int i= 0; int i= 0; i 0 i< Integer.parseInt(b) i Integer.parseInt(b) Integer.parseInt Integer b i++ i++ i {
			 asb.append(a);
		 } {
			 asb.append(a);
		 } asb.append(a) asb.append asb a StringBuilder bsb = new StringBuilder(); bsb new StringBuilder() for(int i= 0; i< Integer.parseInt(a); i++) {
			 bsb.append(b);
		 } int i= 0; int i= 0; i 0 i< Integer.parseInt(a) i Integer.parseInt(a) Integer.parseInt Integer a i++ i++ i {
			 bsb.append(b);
		 } {
			 bsb.append(b);
		 } bsb.append(b) bsb.append bsb b if(asb.toString().compareTo(bsb.toString()) <= -1) {
			 System.out.println(asb.toString());
		 }else{
			 System.out.println(bsb.toString());
		 } asb.toString().compareTo(bsb.toString()) <= -1 asb.toString().compareTo(bsb.toString()) asb.toString().compareTo asb.toString() asb.toString asb bsb.toString() bsb.toString bsb -1 1 {
			 System.out.println(asb.toString());
		 } System.out.println(asb.toString()) System.out.println System.out System System.out asb.toString() asb.toString asb {
			 System.out.println(bsb.toString());
		 } System.out.println(bsb.toString()) System.out.println System.out System System.out bsb.toString() bsb.toString bsb String[] args args public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String a = scan.next();
		String b = scan.next();

		 StringBuilder asb = new StringBuilder();

		 // a * b
		 for(int i= 0; i< Integer.parseInt(b); i++) {
			 asb.append(a);
		 }

		 StringBuilder bsb = new StringBuilder();

		 // b * a
		 for(int i= 0; i< Integer.parseInt(a); i++) {
			 bsb.append(b);
		 }

		 //System.out.println(asb.toString());
		 //System.out.println(asb.toString().compareTo(bsb.toString()));

		 if(asb.toString().compareTo(bsb.toString()) <= -1) {
			 System.out.println(asb.toString());
		 }else{
			 System.out.println(bsb.toString());
		 }


	}

} public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String a = scan.next();
		String b = scan.next();

		 StringBuilder asb = new StringBuilder();

		 // a * b
		 for(int i= 0; i< Integer.parseInt(b); i++) {
			 asb.append(a);
		 }

		 StringBuilder bsb = new StringBuilder();

		 // b * a
		 for(int i= 0; i< Integer.parseInt(a); i++) {
			 bsb.append(b);
		 }

		 //System.out.println(asb.toString());
		 //System.out.println(asb.toString().compareTo(bsb.toString()));

		 if(asb.toString().compareTo(bsb.toString()) <= -1) {
			 System.out.println(asb.toString());
		 }else{
			 System.out.println(bsb.toString());
		 }


	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String a = scan.next();
		String b = scan.next();

		 StringBuilder asb = new StringBuilder();

		 // a * b
		 for(int i= 0; i< Integer.parseInt(b); i++) {
			 asb.append(a);
		 }

		 StringBuilder bsb = new StringBuilder();

		 // b * a
		 for(int i= 0; i< Integer.parseInt(a); i++) {
			 bsb.append(b);
		 }

		 //System.out.println(asb.toString());
		 //System.out.println(asb.toString().compareTo(bsb.toString()));

		 if(asb.toString().compareTo(bsb.toString()) <= -1) {
			 System.out.println(asb.toString());
		 }else{
			 System.out.println(bsb.toString());
		 }


	}

}