I want to prove the following and I do not know how.
Let $X$ be a CW-complex of dimension $n-1$ and let $Y$ denote the space obtained from $X$ by attaching a finite number of $n$-cells. Then the inclusion $j:X \to Y$ induces isomorphisms: $$ H_i(X) \to H_i(Y)$$ for all $i \leq n-2$.