Let $S$ be a closed, orientable surface and $\gamma$ a simple closed curve on $S$. Show that $S$ retracts onto $\gamma$ if and only if $\gamma$ represents a non-trivial element in homology.
Clearly, if $[\gamma]=0$ in $H_1(S)$, the composition $H_1(\gamma) \rightarrow H_1(S) \rightarrow H_1(\gamma)$ can not be the identity. If the class of $\gamma$ is non-zero, how can we construct such retraction?