Continuous map to quotient space Let $X,Y,Z$ be topological spaces, and suppose $\pi:Y\rightarrow Z$ is a quotient map. Is a continuous map $f:X\rightarrow Z$ necessarily the composition of a continuous map $g:X\rightarrow Y$ with $\pi$? What if $X,Y,Z$ are smooth manifolds and we replace 'continuous' with 'smooth'?

No. Let $X$ and $Z$ be circles and $Y=\mathbb{R}$. There is a continuous (and in fact smooth) bijective map $X \to Z$, but it won't factor through $Y$, a map from a circle to the real line cannot be injective.
