On Hatcher's book Algebraic Topology, Section 4.C Prop. 4C.1, for a simply-connected CW-complex $X$, if $H_*(X;\mathbb{Z})$ is known as a graded module over $\mathbb{Z}$, then the minimal cell structure of $X$ can be obtained by:
What should I do if $X$ is not simply-connected?