Percolation with union-find