N=int(eval(input()))

M=10**9+7

ans=1

m=1

for i in range(N):ans=(ans*10)%M

for i in range(N):m=(m*9)%M

ans-=(m*2)%M

m=1

for i in range(N):m=(m*8)%M

print(((ans+m)%M))
N=int(eval(input()))

M=10**9+7

a,b,c=1,1,1

for i in range(N):a,b,c=a*10%M,b*9%M,c*8%M

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

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

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