Hello Sergej,
if you need to know the Nth digit of a number (i.e. 10987654321), assuming that we say that the rightmost digit is the digit 1, (so in my example 1st digit is 1), you can use:
> x=10987654321
> div (mod x (10^N)) (10^(N-1))
So, if you don't need a fast program and you want to compute the digit in position 177486336 of 9^(9^9):
> x=9^(9^9)
> div (mod x (10^177486336)) (10^177486335)
(it takes about 1 minute to compute it)
or in general if you want to know the N-th digit :
> x=9^(9^9)
> div (mod x (10^N)) (10^(N-1))