on the factorization of maps between connected CW complexes I'm working on problem 16 in section 4.1 of Hatcher's Algebraic Topology book. I really have no ideas so far:
Show that a map $f: X \to Y$ between connected CW complexes factors as a composition $X \to Z_n \to Y$ where the first map induces isomorphisms on $\pi_n$ for $i\le n$ and the second map induces isomorphisms on $\pi_n$ for $i\ge n+1$.
Any help is appreciated.

Consider proposition 4.13 in Hatcher with respect to the pair $(M_f,X)$, where $M_f$ is the mapping cylinder of $f:X\to Y$. This should get you everything but the isomorphism $\pi_n(X)\to \pi_n(Z_n)$. 
To handle this last case, take a look at the argument for constructing a Postnikov tower (example 4.17) for inspiration.
