Let $U$ be an open connected set in $\Bbb C$ and $f:U\to \Bbb C$ be a continuous map such that $z\mapsto f(z)^n$ is analytic for some positive integer $n$. Prove that $f$ is analytic.
I think the statement is FALSE. Consider the function $f(z)=\sqrt z$ in any open connected set $U\subset \mathbb C$ containing $0$. Then $f$ is continuous and $f(z)^2$ is analytic , but $f$ is not analytic.
Is my argument correct or there are some misunderstanding ?
If the statement is TRUE then how I can proceed to prove it ?