an exercise involving open mapping theorem I am stuck with an exercise in complex analysis that reads as follows...
Suppose $f:U\longrightarrow\mathbb{C}$ is a holomorphic function from a connected open set $U$ such that for every $z\in U$ there are integers $m,n$ possibly depending on $z$ such that $f(z)^m=\overline{f(z)}^n$. Show that $f$ is constant. I think I should use the open mapping theorem to define a logarithm or a $m$th root of $f$ locally, but since $m,n$ are a priori dependent on $z$ I don't see where to go from there... any help would be appreciated.
Thanks!

Suppose that $f$ is not constant, then there exists $z_0\in U$ such that $f'(z_0)\neq 0$. Consider a small open region $V\subseteq U$ around $z_0$, such that $f'(z)\neq 0$ for all $z\in V$.
For $n,m\in\mathbb N$, set $$A_{n,m}=\left\{z\in V\big{|}f(z)^m=\overline{f(z)}^n\right\}.$$
Note first that continuity of $f$ and $\overline{f}$ implies that all the $A_{n,m}$ are closed. Since now $\bigcup_{n,m\in\mathbb N}A_{n,m}=V$, Baire's theorem implies that, for some fixed $n_0,m_0\in\mathbb N$, $A_{n_0,m_0}$ contains a ball $B_{\varepsilon}(w)$. We now distinguish cases:
i) If $n_0=0$ or $m_0=0$, then $f$ is constant in $$B_{\varepsilon}(w)\subseteq A_{n_0,m_0}\subseteq V,$$ so $f'(w)=0$, which is a contradiction, since $w\in V$.
ii) If $n_0,m_0>1$, you work as in Tsemo Aristide's answer, to obtain that $f$ is constant in $B_{\varepsilon}(w)$. Then $f'(w)=0$, which is again a contradiction.
