def nameOfBestCustomer(sales: list, customers: list):
    maxSale = sales[0]
    maxName = customers[0]

    assert len(sales) == len(customers)

    for i in range(1, len(sales)):
        if maxSale < sales[i]:
            maxSale = sales[i]
            maxName = customers[i]
    
    return maxName


def main():
    sales = []
    customers = []

    while True:
        sale = int(input("Inserisci la spesa: "))

        if sale == 0:
            break

        name = input("Inserisci il nome del cliente: ")

        sales.append(sale)
        customers.append(name)
    
    print(nameOfBestCustomer(sales, customers))


main()