# Problem based on Casorati Weierstrass Theorem

Let $f$ be analytic in $G$ ={$z:0<|z-a|<r$} except that there is a sequence of poles {$a_n$} in $G$ with $a_n\to a$. Show that for any $w$ in $\mathbb{C}$ there is a sequence {$z_n$} in $G$ with $a=$ lim $z_n$ and $w=$ lim $f(z_n)$.

I was trying to solve some problems of Conway complex analysis but I can not able to solve this problem. I was trying to look at the behavior of $f$ around $a$ and if I able to show that $a$ is essential singularity then we are done. But $a$ is not an isolated singularity also. Any help/hint in this regards would be highly appreciated. Thanks in advance!

Suppose that $p$ is such that there is no sequence tending to $a$ along which $f$ tends to $p$. Then there exist $\delta>0$ and $\rho>0$ such that $|f(z)-p|>\delta$ whenever $0<|a-z|<\rho$, $z\ne a_n$.
Consider $g=1/(f-p)$. First show that $g$ has a removable singularity at $a_n$ for every $n$. So $a$ is an isolated singularity of $g$, and then it's clear that $g$ has a removable singularity at $a$.
But $g(a_n)=0$, so if $g$ has a removable singularity at $a$ then $g$ is identically $0$. Hence $f(z)=\infty$ for every $z$.