N = int(eval(input()))



tot = 10**N - (9**N + 9**N - 8**N)

print((tot%(10**9 + 7)))
n = int(eval(input()))

mod = 10**9 + 7



ans = pow(10,n,mod)

ans -= pow(9,n,mod)*2

ans += pow(8,n,mod)



print((ans%mod))
N = int(eval(input()))
tot = 10**N - (9**N + 9**N - 8**N)
print((tot % (10**9 + 7)))

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

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