Changing the Modulo congruence base? This is a conversion someone on SE made:
$$77777\equiv1\pmod{4}\implies77777^{77777}\equiv77777^1\equiv7\pmod{10}$$
But I don't understand how this is done? 

What was actually used is Euler's theorem:
$$a^{\varphi(n)} \equiv 1 \pmod n$$
Where $\varphi$ is the totient function. $\varphi(10) = 4$ so
$$77777^{a + 4k} \equiv 77777^a \pmod{10}\\
\Rightarrow 77777^{77777} \equiv 77777^{77777 \bmod 4} = 77777^1 \pmod{10}$$
