There's no reason not to change the problem to $ tan^2(\phi) = 1$ and $\phi\in [0, 12\pi]$. It may be less confusing for you this way. Then just remember to multiply your final answer by 3, since $\theta = 3 \phi$.
How many revolutions is $12 \cdot pi$? Six right?
$tan(\phi) = \pm 1$
If you have a vector at $(x, y)$ at an angle of $\phi$ off the positive X axis, what is $tan(\phi)$?

You should be able to tell from basic trig that the tangent of the angle is $y/x$. So, we are looking for the $\phi$ for which $y/x = \pm 1$, in other words, the x distance is the same as the y distance.
You should find 4 angles for which the x value is the same as the y value. One of them is shown above, $\phi = pi / 4$. But that is just 4 angles in one revolution. Your range is six revolutions. That's 24 total angles.
So your solution should include the six solutions: $\phi = \frac \pi 4, \phi = \frac \pi 4 + 2\pi, ... \phi = \frac \pi 4 + 5 \cdot 2\pi$.
The other 24 - 6 = 18 solutions are from the six revolutions of the other 3 angles.
Don't forget to write your final answer in terms of $\theta$, not $\phi$.