Solve $636^{369}\equiv x\pmod{126}$ 
Solve
$$636^{369}\equiv x\pmod{126}$$

My attempt:
$$126=2\times 3^2 \times 7$$
$$\varphi(126)=\varphi(2)\times \varphi(3^2)\times \varphi(7)=36$$
$$\color{gray}{636=6\pmod{126}}$$
$$6^{369}\equiv x \pmod{126}$$
$$2^{369}3^{369}\equiv x \pmod{126}$$
I am stuck here
 A: $636 \equiv 06 \equiv 6 $ (mod 7)
$\varphi(7)=6$
$369 \equiv 09 \equiv 3$ (mod 6)
So
$636^{369}\equiv 6^3 \equiv 36 \times 6 \equiv 6$ (mod 7)
(Note that $gcd(636,7)=1$)
Also, $636\equiv06 \equiv 6$ (mod 9)
and $6\times6=36\equiv 0$ (mod 9)
So
$636^n\equiv 0$ (mod 9) for $n>1$
Therefore, we have $636^{369}=6+7k\equiv 0$ (mod 18)
Hence $k \equiv-\frac{6}{7}\equiv-\frac{42}{7}\equiv-6\equiv12$ (mod 18)
So, finally, $636^{369} =6+7(12+18k')\equiv6+84\equiv90$ (mod 126)
A: I would exploit the factorization of $126$ already given and solve the equation separately modulo $2$, modulo $3^2=9$, and modulo $7$.  Then apply the Chinese Remainder Theorem.
It is easy to see that $x$ will have $0$ residue modulo $2$ and modulo $9$.  Only modulo $7$ requires any further work.  The base $636$ has residue $6\equiv-1$ modulo $7$.  The Euler totient function of $7$ is $6$ and the exponent $369$ has residue $3$ modulo $6$.  So $x\equiv(-1)^3\equiv-1$ modulo $7$.
The Chinese Remainder theorem tells us that there will be one residue moodulo $2*9*7=126$ that is divisible by $2*9$ and one less than a multpile of $7$.  This value can be found easily by trial, thus $x\equiv90$ modulo $126$.
A: A little guess work, combined with Chinese remainder theorem, can save efforts.
We look at each modulus $2,7,9$ respectively.
Clearly $636$ is even.
Also $636^{369}\equiv6^{369}\pmod9.$ Since $6^2\equiv0\pmod9,$ we find $6^{369}\equiv0\pmod9.$
And $636\equiv-1\pmod7,$ so $636^{369}\equiv(-1)^{369}\equiv6\pmod7.$
Now apply Chinese remainder theorem: Since $27\equiv0\pmod9$ and $27\equiv6\pmod7,$ we find that $27\pmod{63}$ is the unique number modulo $63$ satisfying the two congruence conditions. Finally, to find $k\pmod{126}$ even such that $\begin{cases}k\equiv0\pmod2\\k\equiv27\pmod{63}\end{cases}$ we simply take $k\equiv27+63=90\pmod{126}.$ Therefore we conclude that $636^{369}\equiv90\pmod{126}.$
Hope this helps.
A: By $ \ ab\bmod ac\, =\, a\,(b\bmod c)\,$ [mod Distributive Law]
$\!\underbrace{6^{\large 369}}_{\large 6\ \equiv\ 636}\!\!\bmod 126 = 18\underbrace{(2\cdot 6^{\large 367}\bmod{7}}_{\large 2(-1)^{\large 637}\equiv\ -2\ \equiv\ \color{#c00}5 })  = 18(\color{#c00}5) = 90$
