let $X$ be a topological space. suppose $\pi_i(X)=\mathbb Z$. let $f:S^i\rightarrow X$ be a representative of the generator of $\pi_i(X)$. $f$ induces an homomorphism $f_*:\pi_i(S^i)\rightarrow \pi_i(X)$ why $f_*$ is an isomorphism?
my guess: for every $\gamma:S^i\rightarrow S^i$
this is injective as a homomorphism from $Z$ to $Z$ but why it is surjective? i mean take a class $[h]\in \pi_i(X)$ why would exist a map $\gamma:S^i\rightarrow S^i$ such that $f\circ \gamma$ is homotopic to $h$?