For all complex numbers z, let
f(z) = z^2 if z is not real
f(z) = z^3 if z is real
Find f(f(f(f(1+i)))).
\((1+i)^2 = i^2+2i+1 = -1 + 2i +1 = 2i\)
\((2i)^2 = 4i^2 = 4 \times -1 = -4\)
\(-4^3 = -64\)
\(-64^3 = \color{brown}\boxed{-262,144}\)