more pythonic while condition
implemented breadth first search (exploration en largeur)