I need to find three integer $ a\equiv 19^{10562}(mod\: 40320) $. I know that I need to use Eulers Formula $a^{\phi (m)}\equiv 1(mod\: m)$. I have determined that $\phi (m)=9216$. So using this I think $19^{9216}\equiv 1(mod\, 40320)$. Now I believe that gets me to the following.
$$19^{10562}\equiv 19^{9216}\cdot 19^{1346}(mod\, 40320)$$
But after this I am unsure where to go with this because I'm not sure how to address the $19^{1346}(mod\, 40320)$. Any insight would be appreciated.
Thanks,