mod = 10 ** 9 + 7



N = int(eval(input()))



s, n, z, e = 1, 0, 0, 0

for _ in range(N):

    s, n, z, e = 8 * s, s + n * 9, s + z * 9, n + z + e * 10

    s %= mod

    n %= mod

    z %= mod

    e %= mod



print(e)
mod = 10 ** 9 + 7



N = int(eval(input()))

print(((pow(10, N, mod) - 2 * pow(9, N, mod) + pow(8, N, mod)) % mod))
mod = 10**9 + 7
N = int(eval(input()))
s, n, z, e = 1, 0, 0, 0
for _ in range(N):
    s, n, z, e = 8 * s, s + n * 9, s + z * 9, n + z + e * 10
    s %= mod
    n %= mod
    z %= mod
    e %= mod
print(e)

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

-s, n, z, e = 1, 0, 0, 0 -for _ in range(N): -    s, n, z, e = 8 * s, s + n * 9, s + z * 9, n + z + e * 10 -    s %= mod -    n %= mod -    z %= mod -    e %= mod -print(e) +print(((pow(10, N, mod) - 2 * pow(9, N, mod) + pow(8, N, mod)) % mod))