Imports System
Module ABC152B
	Sub Main()
		Dim inputs() As String
		inputs = Console.ReadLine().Split()
		Dim aa,bb As String
		aa = new String(inputs(0),Integer.Parse(inputs(1)))
		bb = new String(inputs(1),Integer.Parse(inputs(0)))
		If aa <= bb
			Console.WriteLine(aa)
		Else
			Console.WriteLine(bb)
		End If
	End Sub
End Module
