<s>[INST] Find the remainder when $7^{7^{7}}$ is divided by 1000 I need help with this problem please 

Find the remainder when $7^{7^{7}}$ is divided by $1000$

My try follow
$1000=8×125$ , now 
$7 \equiv -1 \;\bmod\; (8)$ 
$\to$  $7^{7^{7}} \equiv -1 \;\bmod\; (8)$      and 
$7^{100}\equiv 1 \;\bmod\; (125)$
Any help to complete this solution? 
 [/INST] As $7^4=2400+1$  and $7\equiv-1\pmod4\implies 7^7\equiv-1\equiv3\pmod4$
We can write $7^7=4m+3$ where integer $m\ge0$
$$7^{4m+3}=7^3(1+2400)^m$$
Now $(1+2400)^m\equiv1+\binom m12400\pmod{1000}$
$7^8=(1+2400)^2\equiv1\pmod{40}\implies7^7\equiv7^{-1}\equiv23$
We can choose $7^7=40n+23=4(10n+5)+3$
$\implies m\equiv5\pmod{10}, m=10r+5$(say)
$1+2400m\equiv1+2400(10r+5)\equiv1\pmod{1000}$
</s>