From old qualifying exam: Let $E$ be the union of the two coordinate axes, i.e. $E = \{z=x+iy : xy=0\}$. Describe all entire functions satisfying $f(E) \subset E$.
I feel like the best approach is to consider the power series of $f$. My first approach was to write down constraints by considering the function applied to the real or imaginary axis. When I didn't get anywhere with this, I began thinking of the function geometrically: on $E$ it's allowed to scale by a real constant, and rotate by $k\pi/2$. But again, I couldn't see how to usefully translate this to produce information about the power series. Thanks!
As an example, $z^2$ has this property. In fact, so does $az^2+bz^4$ (with $a,b \in \mathbb{R}$) since each term maps the imaginary axis to the real axis, which ends up back on the real axis when added. A similar argument shows real odd polynomials work, too.