import math



n = int(eval(input()))

inf = 10 ** 9 + 7



df = (10 ** n) - (2 * 9 ** n - 8 ** n)



print((df % inf))
n=int(eval(input()))

mod=10**9+7

e=pow(8,n,mod)

f=pow(9,n,mod)



g=pow(10,n,mod)

print(((g-2*f+e)%mod))

import math

n = int(eval(input()))
inf = 10**9 + 7
df = (10**n) - (2 * 9**n - 8**n)
print((df % inf))

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

-import math - -inf = 10**9 + 7 -df = (10**n) - (2 * 9**n - 8**n) -print((df % inf)) +mod = 10**9 + 7 +e = pow(8, n, mod) +f = pow(9, n, mod) +g = pow(10, n, mod) +print(((g - 2 * f + e) % mod))