```python
def pick_lane(queues: list, closed: list) -> int:
    if not queues or not queues[0] >= 0 or not closed or not all(isinstance(i, int) and i >= 0 for i in closed):
        raise ValueError("Invalid input: queues must be non-empty, non-negative integers, and closed must be a list of non-negative integers")
    if all(lane in closed for lane in range(len(queues))):
        raise ValueError("All lanes are closed")
    best = 0
    for lane in range(1, len(queues)):
        if queues[lane] <= queues[best] and lane not in closed:
            best = lane
    return best
```