how to solve these questions with congruences how can I solve these type of questions :     using congruences
find the last digit  or last two digit of $27^{27^{26}}$ and find remainder when $53^{103}$ is divided by 7.
I can solve 2nd question and a simpler case of first question with binomial  theorem but in questions like 1st this does not seem to work for me, and using binomial makes the solution too lengthy so as I see I have only left congruence method but I do not know how to initiate the solution .     
I have burton's book of number theory in which there are some examples and exercises for questions like this but still I am not able to catch the pattern these queations should follow to be solved by congruences ,
I would really appreciate any advice or suggestions  or anything that can help me to solve these questions
 A: To find the last two digits of $27^{27^{26}}$, you can first deal with the exponent of 27, namely $27^{26}$. First, consider $27^1$. This is congruent to 27 (mod 100). We use mod 100 in order to get the last two digits as this gives us the last two digits of the representation in base 10. 
Now, find that $27^2$=729, which is congruent to 29 (mod 100). Use the fact that if $a\equiv{b}$ (mod c), then $a^k$$\equiv{b^k}$ (mod c). This means that $27^4\equiv{29^2}$ (mod 100). You can repeat this process in order to quickly find the congruences for all powers of 27 that are powers of two. Then multiply together the appropriate ones to find $27^{26}$ (mod 100). In this case, you will need to multiply what you find to be the congruences for $27^2$, $27^8$, and $27^{16}$, since 2+8+16=26. Reduce this mod 100. Note that this uses the fact that if $a\equiv{b}$ (mod m) and if $c\equiv{d}$ (mod m), then $ac\equiv{bd}$ (mod m). So, we now know the last two digits of $27^{26}$. Say they are $xy$. Then, to find the last two digits of $27^{27^{26}}$, do this process again, this time considering $27^{100k+xy}$=$(27^{100})^k*27^{xy}$. The first part requires that you find the modulo of $27^{100}$ (the $k$ can be ignored as this doesn't change the value). The second part also requires the original method again. Then multiply their modulos and reduce mod 100 again if necessary
FYI, the last two digits are 87.
A: By Euler's totient theorem, we know
$$
27^{\phi(100)}=27^{40}\equiv 1 \rm{mod} 100,
$$
On the other hand,
$$
27^{\phi(40)}=27^{16}\equiv 1 \rm{mod} 40,
$$
so we have $27^{26}\equiv 27^{10}\equiv 3^{30}\equiv 3^{4\times7}\cdot9\rm{mod}40\equiv 9 \rm{mod}$.
Hence we have 
$$
27^{27^{26}}\equiv27^{40n+9}\equiv 27^9\rm{mod} 100=3^{27}\rm{mod} 100
$$
Which is not difficult to conclude the answer 87.
