union-find with: semi-compression.