So, I've figured out that: $12 \equiv 2 \mod 10$
And hence,
$$ 12^{157} \equiv 2^{157} \mod 10$$
I thought of expanding out $2^{157} = 2^{156} \cdot 2 = 4^{78} \cdot 2 = 16^{39} \cdot 2$, then I could write: $$ 12^{157} \equiv 2^{157} \equiv 16^{39} \cdot 2 \equiv 6^{39} \cdot 2 \equiv 36^{19}\cdot 12\equiv 6^{19} \cdot 2 \equiv 36^9 \cdot 12 \equiv 6^9 \cdot 2 \equiv 36^4 \cdot 12 \equiv 6^4 \cdot 2 \equiv 72 \cdot 36 \equiv 2 \cdot 6 \equiv 2 $$
This is quite a long process. I found that you could use fermats little theorem to speed up the case when the number we taking mod with is prime, however are there any theorems/methods which can be used to speed up calculations when we take a composite numbers?