how to compute the last 2 digits of $3^{3^{3^{3}}}$ to n times? Input $n$, output the last $2$ digits of the result.
n=1 03 3=3  
n=2 27 3^3=27  
n=3 87 3^27=7625597484987
n=4 ?? 3^7625597484987=??

Sorry guys, the formula given is $T_n=3^{T_{n-1}}$, I have updated the example.
I was asked this question during an interview, but I didn't have any clue. (The interviewer kind of gave me a hint that for $n>10$, the last $10$ digits of all results would be the same?)

Notice $$3^{100} = 515377520732011331036461129765621272702107522001 \equiv 1 \pmod{100}$$
If we define $p_n$ such that $p_1 = 3$ and $p_n = 3^{p_{n-1}}$ recursively and
split $p_n$ as $100 q_n + r_n$ where $q_n, r_n \in \mathbb{Z}$, $0 \le r_n < 100$, we have
$$p_n = 3^{p_{n-1}} = 3^{100 q_{n-1} + r_{n-1}} \equiv 1^{q_{n-1}}3^{r_n} \equiv 3^{r_{n-1}} \pmod{100} \\ \implies r_n \equiv 3^{r_{n-1}} \pmod{100}$$
This means to obtain $r_n$, the last two digit of $p_n$, we just need to start with
$r_1 = 3$ and repeat iterate it. We find 
$$\begin{align}
r_1 &= 3\\
r_2 &\equiv 3^3 = 27 \pmod{100}\\
r_3 &\equiv 3^{3^3} = 7625597484987 \equiv 87 \pmod{100}
\end{align}$$
Notice 
$$3^{87} = 323257909929174534292273980721360271853387 \equiv 87 \pmod{100}$$
So after the third (not fourth) iteration, we have $r_n = 87$ for all $n \ge 3$. 
