
import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int a = scn.nextInt(), b = scn.nextInt();
		int A,B,DEC;
		A = 0;
		B = 0;
		DEC = 1;
		for(int i = 0;i < b;i++) {
			A += DEC*a;
			DEC*=10;
		}
		DEC = 1;
		for(int i = 0;i < a;i++) {
			B += DEC*b;
			DEC*=10;
		}
		System.out.println((a<b)?A:B);
	}

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

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int a = scn.nextInt(), b = scn.nextInt();
		int A,B,DEC;
		A = 0;
		B = 0;
		DEC = 1;
		for(int i = 0;i < b;i++) {
			A += DEC*a;
			DEC*=10;
		}
		DEC = 1;
		for(int i = 0;i < a;i++) {
			B += DEC*b;
			DEC*=10;
		}
		System.out.println((a<b)?A:B);
	}

} Main public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int a = scn.nextInt(), b = scn.nextInt();
		int A,B,DEC;
		A = 0;
		B = 0;
		DEC = 1;
		for(int i = 0;i < b;i++) {
			A += DEC*a;
			DEC*=10;
		}
		DEC = 1;
		for(int i = 0;i < a;i++) {
			B += DEC*b;
			DEC*=10;
		}
		System.out.println((a<b)?A:B);
	} main {
		Scanner scn = new Scanner(System.in);
		int a = scn.nextInt(), b = scn.nextInt();
		int A,B,DEC;
		A = 0;
		B = 0;
		DEC = 1;
		for(int i = 0;i < b;i++) {
			A += DEC*a;
			DEC*=10;
		}
		DEC = 1;
		for(int i = 0;i < a;i++) {
			B += DEC*b;
			DEC*=10;
		}
		System.out.println((a<b)?A:B);
	} Scanner scn = new Scanner(System.in); scn new Scanner(System.in) int a = scn.nextInt() a scn.nextInt() scn.nextInt scn b = scn.nextInt(); b scn.nextInt() scn.nextInt scn int A A B B DEC; DEC A = 0 A 0 B = 0 B 0 DEC = 1 DEC 1 for(int i = 0;i < b;i++) {
			A += DEC*a;
			DEC*=10;
		} int i = 0; int i = 0; i 0 i < b i b i++ i++ i {
			A += DEC*a;
			DEC*=10;
		} {
			A += DEC*a;
			DEC*=10;
		} A += DEC*a A DEC*a DEC a DEC*=10 DEC 10 DEC = 1 DEC 1 for(int i = 0;i < a;i++) {
			B += DEC*b;
			DEC*=10;
		} int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
			B += DEC*b;
			DEC*=10;
		} {
			B += DEC*b;
			DEC*=10;
		} B += DEC*b B DEC*b DEC b DEC*=10 DEC 10 System.out.println((a<b)?A:B) System.out.println System.out System System.out (a<b)?A:B (a<b) a b A B String[] args args public class Main{

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int a = scn.nextInt(), b = scn.nextInt();
		int A,B,DEC;
		A = 0;
		B = 0;
		DEC = 1;
		for(int i = 0;i < b;i++) {
			A += DEC*a;
			DEC*=10;
		}
		DEC = 1;
		for(int i = 0;i < a;i++) {
			B += DEC*b;
			DEC*=10;
		}
		System.out.println((a<b)?A:B);
	}

} public class Main{

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int a = scn.nextInt(), b = scn.nextInt();
		int A,B,DEC;
		A = 0;
		B = 0;
		DEC = 1;
		for(int i = 0;i < b;i++) {
			A += DEC*a;
			DEC*=10;
		}
		DEC = 1;
		for(int i = 0;i < a;i++) {
			B += DEC*b;
			DEC*=10;
		}
		System.out.println((a<b)?A:B);
	}

} Main

import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int a = scn.nextInt(), b = scn.nextInt();
		int A,B,DEC;
		A = 0;
		B = 0;
		DEC = 1;
		for(int i = 0;i < b;i++) {
			A += DEC*a;
			DEC*=10;
		}
		DEC = 1;
		for(int i = 0;i < a;i++) {
			B += DEC*b;
			DEC*=10;
		}
		System.out.println((a<b)?A:B);
	}

}
