(def a (read *in*))
(def b (read *in*))
(def astr (apply str (repeat a b)))
(def bstr (apply str (rebeat b a)))
(if (> (compare astr bstr) 0)
   (print (Integer/parseInt bstr))
   (print (Integer/parseInt astr)))
