Modular exponentiation obeys all of the normal rules of ordinary exponentiation. Particularly: a b a c a ...
www.dragonwins.com