n=int(eval(input()))

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

mod=10**9+7

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

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

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