Don’t use sets for the connected component