Check if vertices u and v are connected.
        Query top level forest F[0] to see if u and v are in the same tree.
        This can be done by checking F_{log(n)} if Findroot(u) = Findroot(v).
        This costs O(log(n) / log(log(n))) using B-tree based Euler-Tour trees.
        but this trades off with a O(log^2(n)/log(log(n))) update
        This is O(log(n)) otherwise

def is_connected(self, u, v):
        """
        Check if vertices u and v are connected.
        Query top level forest F[0] to see if u and v are in the same tree.
        This can be done by checking F_{log(n)} if Findroot(u) = Findroot(v).
        This costs O(log(n) / log(log(n))) using B-tree based Euler-Tour trees.
        but this trades off with a O(log^2(n)/log(log(n))) update
        This is O(log(n)) otherwise
        """
        ru = self.forests[0].find_root(u)
        rv = self.forests[0].find_root(v)
        return ru == rv