mod = 10**9+7

def powmod(x,y):

    res = 1

    for i in range(y):

        res = res*x%mod

    

    return res



N = int(eval(input()))

ans = powmod(10,N)-powmod(9,N)-powmod(9,N)+powmod(8,N)

ans %=mod

ans = (ans+mod)%mod

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

N = int(eval(input()))

ans = 10**N-(9**N)*2+8**N

ans %=mod

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


def powmod(x, y):
    res = 1
    for i in range(y):
        res = res * x % mod
    return res


N = int(eval(input()))
ans = powmod(10, N) - powmod(9, N) - powmod(9, N) + powmod(8, N)
ans %= mod
ans = (ans + mod) % mod
print(ans)

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

- - -def powmod(x, y): -    res = 1 -    for i in range(y): -        res = res * x % mod -    return res - - -ans = powmod(10, N) - powmod(9, N) - powmod(9, N) + powmod(8, N) +ans = 10**N - (9**N) * 2 + 8**N -ans = (ans + mod) % mod