 <span class="k">while</span> <span class="n">queue</span><span class="p">:</span>
        <span class="k">if</span> <span class="n">a_l</span><span class="p">[</span><span
            class="n">current_node</span><span class="p">]:</span>
            <span class="n">queue</span><span class="o">.</span><span class="n">append</span><span
            class="p">(</span><span class="n">current_node</span><span class="p">)</span>
            <span class="n">current_node</span> <span class="o">=</span> <span clas