I understand how to do modular arithmetic on numbers with large exponents (like $8^{202}$). However, I am having trouble understanding how to calculate something like:
$ 3^{3^{3^{3^3}}}$ mod 5
(that's 5 3's there). Can anyone help me understand how to get this started?