How do we solve for a $a = (5^4\ (\text{mod}\ 7))^3\ (\text{mod}\ 13)$
I know that I have to evaluate $5^4\ (\text{mod}\ 7)$ first, but how do you do that without using a calc?
then I have to evaluate  $x^3\ (\text{mod}\ 13)$. Any tip?

$$5^4=25\cdot 25\equiv 4\cdot 4 \equiv 2 \quad(\text{mod}\,7)$$
$$2^3 = 8 \equiv 8 \quad(\text{mod}\,13)$$
