N=int(eval(input()))

a=1;b=1;c=1

MOD=10**9+7

for i in range(N):

  a=a*10%MOD

  b=b*9%MOD

  c=c*8%MOD



print(((a-2*b+c)%MOD))
N=int(eval(input()));M=10**9+7

print(((pow(10,N,M)-2*pow(9,N,M)+pow(8,N,M))%M))

N = int(eval(input()))
a = 1
b = 1
c = 1
MOD = 10**9 + 7
for i in range(N):
    a = a * 10 % MOD
    b = b * 9 % MOD
    c = c * 8 % MOD
print(((a - 2 * b + c) % MOD))

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

-a = 1 -b = 1 -c = 1 -MOD = 10**9 + 7 -for i in range(N): -    a = a * 10 % MOD -    b = b * 9 % MOD -    c = c * 8 % MOD -print(((a - 2 * b + c) % MOD)) +M = 10**9 + 7 +print(((pow(10, N, M) - 2 * pow(9, N, M) + pow(8, N, M)) % M))