(This answer assumes all the $a_i$ are non-negative integers.)
Consider $t = a^{b^c}$ (where $c$ may be a power tower).
If $b^c = 0$, set $t = 1$. Otherwise, if $a = 0$, set $t = 0$. (Edited to swap the two cases handling zeroes.)
So now we know $a > 0$ and $b^c > 0$.
Otherwise, by the Chinese remainder theorem, it is enough to know the value of $t$ modulo $2$ and $5$ to recover the last decimal digit.
- If $a$ is even, $t$ is even (i.e. is congruent to $0$ modulo $2$).
- If $a$ is odd , $t$ is odd (i.e. is congruent to $1$ modulo $2$).
This is enough to tell us if $c$ is even or odd if $c$ is a power tower.
Now we just need to find $a^{b^c} \pmod{5}$. By Fermat's little theorem, $a^4 \cong 1 \pmod{5}$, so it is sufficient to know how $4$ divides into $b^c$, i.e., to know $q$ and $r$ in $b^c = 4q+r$, because then $t = a^{4q+r} = a^{4q} a^r = (a^4)^q a^r \cong 1^q a^r \cong a^r \pmod{5}$. In fact, we only need $r$, the remainder, so we only need to know $b^c \pmod{4}$. (We could use Euler's theorem here, but it will tell us exactly the same thing because $5$ is prime.)
If $c = 0$, $b^c \cong 1 \pmod{4}$, so $t \cong a^1 \cong a \pmod{5}$.
Otherwise, we use the useful facts: If $b$ is even, $b^2 \cong 0 \pmod{4}$ and if $b$ is odd, $b^2 \cong 1 \pmod{4}$. So we only need to know whether each of $b$ and $c$ is even or odd to determine $b^c \pmod{4}$.
- If $b$ and $c$ are even, $b^c \cong 0 \pmod{4}$. (Easy way to see: $(2x)^{2y} = 2^{2y}x^{2y} = 4^y x^{2y}$, so is a multiple of $4$. In fact, slight variations of this work for all four cases here.)
- If $b$ is even and $c$ is odd, $b^c \cong 2 \pmod{4}$.
- If $b$ is odd and $c$ is even, $b^c \cong 1 \pmod{4}$.
- If $b$ is odd and $c$ is odd, $b^c \cong b \pmod{4}$. If $b \cong 1 \pmod{4}$, this is $b^c \cong 1 \pmod{4}$ and if $b \cong 3 \pmod{4}$, this is $b^c \cong 3 \pmod{4}$.
So now we know $t \cong a^0, a^1, a^2, a^3 \pmod{5}$, depending on easily extracted properties of $b$ and $c$. So we calculate this power of $a$ and reduce modulo $5$.
Having found $t \pmod{2}$ and $t \pmod{5}$, we can use the Chinese remainder theorem to find $t \pmod{10}$, i.e. the last decimal digit of $t$. (Easy way: Suppose we have $3 \pmod{5}$, then the last digit is either $3$ or $8$. Did you want the even one or the odd one?)
Example computation:
$t_1 = 0^{0^{0^{0^{0^0}}}}$, so $a_1 = b_1 = 0, c_1 = 0^{0^{0^0}}$. To determine if $b_1^{c_1} = 0$, we must evaluate $c_1$.
$c_1 = 0^{0^{0^0}}$, so $a_2 = b_2 = 0, c_2 = 0^0$. To determine if $b_2^{c_2} = 0$, we must evaluate $c_2$.
$c_2 = 0^0$, so $a_3 = b_3 = 0, c_3 = \, $. Then $b_3^{c_3} = 0^{\,}$, so $c_2 = 1$.
Then $b_2^{c_2} = 0^1 = 0$, so $c_1 = 1$.
Then $b_1^{c_1} = 0^1 = 0$, so $t = 1$.