     <span class="k">for</span> <span class="n">e</span> <span class="ow">in</span> <span class="n">U</span><span class="p">:</span>
                <span class="n">UF</span><span class="o">.</span><span class="n">union</span><span class="p">(</span><span class="n">e</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">e</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span>

            <span class="k">if</span> <span class="n">obj_type<