def inquire():
    while True:
        (r, k, i) = heappop(queue)
        if ((where[i] != k) or (r != highest_rate[k])):
            continue
        heappush(queue, (r, k, i))
        return r
def inquire():
    while True:
        (r, k, i) = heappop(queue)
        if ((where[i] != k) or (r != highest_rate[k])):
            continue
        heappush(queue, (r, k, i))
        return r