I'm trying to show the following:
Let $f:X\to Y$ be a proper holomorphic map between connected, non-empty Riemann Surfaces. Show that a map $g:Y\to\mathbb{C}$ is holomorphic if and only if its composition with f is holomorphic.
So far I know that $f$ is surjective, since it's proper and holomorphic. My next step was to look at the charts, but it's there, I get stuck.
Suppose that $f$ is non constant, you already know it is surjective. So for a $y\in Y$. The preimage is finite for the points whose preimage is just one point that imply the local neighbourhoods around the points say $x\in X$ such that $f(x)=y$ is isomorphic hence $g\circ f$ being holomorphic imply g is holomorphic around the point $y$. For branch points if $g$ has a singularity it will give arise to a singularity of $g\circ f$, which will be a contradiction.