Q. Let $z$ and $w$ be two complex numbers such that$w=z \bar{z}-2 z+2,\left|\frac{z+i}{z-3 i}\right|=1 $ and $\quad \operatorname{Re}(w)$ has minimum value. Then, the minimum value of $n \in N$ for which $w ^{ n }$ is real, is equal to ________.
Solution: