Last digits number theory. $7^{9999}$? i have looked at/practiced several methods for solving ex: $7^{9999}$. i have looked at techniques using a)modulas/congruence b) binomial theorem c) totient/congruence d) cyclicity. 
my actual desire would be a start to finish approach using totient/congruence. i have figured out how to work the individual steps but not how to combine them and in what order to be able to solve any "end digits" questions.

calculate the congruence class of $999\bmod\phi(10^n)$ (call it $c$). then the last n digits are the last n digits of $7^c$.
Use $\phi(10^n)=4(10)^{n-1}$
For 1 digit: $999\equiv3\bmod4$ so it's $3$
for 2 digits $999\equiv39\bmod 40$ so its $43$
for 3 digits $999\equiv 199 \mod400$ so its $143$
for more than 3 Euler saves you no time. You can try calculating Charmicael's Lambda which is $2^{n-2}\cdot5^{n-1}$for $n\geq3$
