ss="n">T</span></div>


<span class="k">def</span> <span class="nf">_union_treap</span><span class="p">(</span><span class="n">T1</span><span
                        class="p">,</span> <span class="n">T2</span><span class="p">):</span>
    <span class="k">if</span> <span class="ow">not</span> <span class="n">T1</span><span class="p">:</span>
        <span class="k">return</span> <span class="n">T2</span>
    <span class="k">elif</span> <span class="ow">not</span> <span class="n">T2</span><span class="p">:</