Given any positive integer $n,$ let $\phi(n)$ be the number of positive integers less than or equal to $n$ that are relatively prime to $n.$ Find the last three digits of $\large\phi({3}^{2})^{\phi({4}^{2}){}^{\phi({5}^{2})^{.^{.^{.\phi(2019{}^{2})}}}}{}^{}}$
My attempts: I calculated Euler's totient functions separately by the formula $\phi(n)=n\big(1-\frac{1}{p_1}\big)\big(1-\frac{1}{p_2}\big)\cdots\big(1-\frac{1}{p_k}\big),$ and then I worked them with $\pmod{1000}.$ But it looks very tedious!
May be there some smart way to tackle this problem.
Any guidance would be highly appreciated.Thank you!
$\phi(3^2)=\phi(9)=6; \phi(4^2)=\phi(16)=8; $ and $\phi(5^2)=\phi(25)=20$.
Can you show (using the Chinese remainder theorem) that $8^{20}\equiv176\bmod400$
and the same holds for $8^{20m}$, and that $6^{176}\equiv256\bmod1000$?
(For the last congruence, it helps to know that $6^{25}\equiv1\bmod{125}$.)