an class="mi">1</span><span class="p">:</span>
                            <span class="k">if</span> <span class="n">UF</span><span class="o">.</span><span class="n">find</span><span class="p">(</span><span class="n">v</span><span class="p">)</span> <span class="o">==</span> <span class="n">UF</span><span class="o">.</span><span class="n">find</span><span class="p">(</span><span class="n">u</span><span class="p">):</span>
                                <span class="c1"># print(f&quot;found {v} and {u}&quot