N = int(eval(input()))

MOD = 10**9+7



print(((10**N-2*9**N+8**N)%MOD))
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()))
MOD = 10**9 + 7
print(((10**N - 2 * 9**N + 8**N) % MOD))

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))

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