n = int(eval(input()))

mod = 10**9+7



if n==1:

    print((0))

else:

    print((((10**n)-(9**n)-(9**n)+(8**n))%mod))
n = int(eval(input()))

mod = 10**9+7

print(((pow(10,n,mod)-pow(9,n,mod)*2+pow(8,n,mod))%mod))
n = int(eval(input()))
mod = 10**9 + 7
if n == 1:
    print((0))
else:
    print((((10**n) - (9**n) - (9**n) + (8**n)) % mod))

n = int(eval(input()))
mod = 10**9 + 7
print(((pow(10, n, mod) - pow(9, n, mod) * 2 + pow(8, n, mod)) % mod))

-if n == 1: -    print((0)) -else: -    print((((10**n) - (9**n) - (9**n) + (8**n)) % mod)) +print(((pow(10, n, mod) - pow(9, n, mod) * 2 + pow(8, n, mod)) % mod))