Find last digit of $7^{7^{7^7}}$
I know that the last digit of $7^x$ depends on the remainder $x$ leaves when divided by $4$: ($x = 7^{7^7}$) $$7^{4k} \equiv 1 \bmod 10$$ $$7^{4k+1} \equiv 7 \bmod 10$$ $$7^{4k+2} \equiv 9 \bmod 10$$ $$7^{4k+3} \equiv 3 \bmod 10$$
And also that
$$7 \equiv -1 \bmod 4$$
So for all odd positive numbers, $7^{n} \equiv -1 \bmod 4$ and $7^{7}$ is odd. But which congruence relation should I use? $4k+3$ and $4k+1$ are both odd
Please explain, thanks.