Now UnionFind allows only unsigned type