program main
  implicit none
  integer :: a,b
  character(len=9) :: ab,ba
  integer :: i
  read(*,*) a,b
  ab=''
  ba=''
  do i = 1,b
     write(ab(i:i),'(i0)') a
  end do
  do i = 1,a
     write(ba(i:i),'(i0)') b
  end do
  if ( lge(trim(ab),trim(ba)) )then
     write(*,'(a)') trim(ba)
  else 
     write(*,'(a)') trim(ab)
  end if
  stop
end program main