n = int(eval(input()))

ans = 10**n - 2 * 9**n + 8**n

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

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