def main():



    a, b = input().split()

    s = a * int(b)

    t = b * int(a)



    if s < t:

        return s

    return t



if __name__ == '__main__':

    print((main()))

def main():



    a, b = list(map(int, input().split()))

    s = str(a) * b

    t = str(b) * a

    if s < t:

        return s

    return t





if __name__ == '__main__':

    print((main()))

def main():
    a, b = input().split()
    s = a * int(b)
    t = b * int(a)
    if s < t:
        return s
    return t


if __name__ == "__main__":
    print((main()))

def main():
    a, b = list(map(int, input().split()))
    s = str(a) * b
    t = str(b) * a
    if s < t:
        return s
    return t


if __name__ == "__main__":
    print((main()))

-    a, b = input().split() -    s = a * int(b) -    t = b * int(a) +    a, b = list(map(int, input().split())) +    s = str(a) * b +    t = str(b) * a