function breadth_first(start):

 waiting = queue(start)
 visited = {start}
 while waiting is not empty:
 place = waiting.remove_front()
 visit(place)
 for neighbor in place.neighbors:

 if neighbor not in visited:
 visited.add(neighbor)
 waiting.add_back(neighbor)
