peterverebics/CodeNet_Python_118 huggingface dataset:
N = int(input())
print(((10**N) - (2 * (9**N) - (8**N))) % ((10**9) + 7))
#178-C

N = int(input())

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

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

mod=10**9+7

def power_func(a,n,mod):
  bi=str(format(n,"b"))
  res=1
  for i in range(len(bi)):
    res=(res*res)%mod
    if bi[i]=='1':
      res=(res*a)%mod
  return res

x=power_func(10,n,mod)
y=power_func(9,n,mod)
z=power_func(8,n,mod)

ans=(x-(y-z)*2-z)%mod

print(ans)
mod = 10**9+7
n = int(input())
print((pow(10,n,mod)-pow(9,n,mod)*2+pow(8,n,mod))%mod)
n = int(input())
if n > 1:
    print(((10**n) - (9**n * 2 - 8**n))%(10**9+7))
else:
    print("0")
N = int(input())
S = 0
if N == 1:
  print('0')
else:
  S0 = 10**N - 9**N
  S9 = 10**N - 9**N
  S09 = 8**N
  S = S0 + S9 + S09 - 10**N
  S = S % (10**9 + 7)
  print(S)
n=int(input())
print((10**n-2*9**n+8**n)%1000000007)
N = int(input())
MOD = 10**9 + 7
_or = 9**N % MOD
_and = 8**N % MOD
wa = ((9**N) * 2 - 8**N) % MOD
ans = (10**N - wa) % MOD
print(ans)
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

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

if n==1:
    print(0)
else:
    print(((10**n)-(9**n)-(9**n)+(8**n))%mod)
n = int(input())

MOD = 10 ** 9 + 7

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

print(ans)
n = int(input())
m = 10**9+7
a = 10**n - 9**n - 9**n + 8**n
print(a % m)
MOD = 10 ** 9 + 7
n = int(input())
print((pow(10, n, MOD) - pow(9, n, MOD) - pow(9, n, MOD) + pow(8, n, MOD)) % MOD)
N=int(input())
mod = 10**9+7
A=pow(10,N,mod)-2*pow(9,N,mod)+pow(8,N,mod)
print(A%mod)
import sys

read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    N = int(readline())
    ans = pow(10,N,MOD) - pow(9,N,MOD)*2 + pow(8,N,MOD)
    ans %= MOD
    print(ans)

if __name__ == '__main__':
    main()
n = int(input())

mod = 10**9+7

total = 10**n % mod
rest = (((9**(n) % mod) * 2 % mod) - (8**n % mod)) % mod

print((total - rest) % mod)
n = int(input())
MOD = 10**9+7

def f(num):
    return pow(num, n, MOD)

print((f(10)-f(9)-f(9)+f(8))%MOD)
N = int(input())
p = 10**9+7
a = 1
b = 1
c = 1
for _ in range(N):
  a = a*10%p
  b = b*9%p
  c = c*8%p
n = (a-2*b+c)%p
print(n)
n=int(input())
ans=10**n-2*(9**n)+8**n
ans=ans%1000000007
print(ans)
mod = 1000000007
N = int(input())

ans = (10 ** N) - (9 ** N) - (9 ** N) + (8 ** N)
ans = ans % mod
print(ans)
def f(n):
    mod = 1000000007
    return (pow(10, n, mod) - 2 * pow(9, n, mod) + pow(8, n, mod)) % mod

n = int(input())
print(f(n))
M = 10**9 + 7
n = int(input())
print((pow(10, n, M) - 2 * pow(9, n, M) + 8**n) % M)
n = int(input())
ans = (10 ** n - 9 ** n * 2 + 8 ** n) % (10 ** 9 + 7)
print(ans)
n=int(input())
v=pow(10,9)+7
a=pow(10,n,v)-2*pow(9,n,v)+pow(8,n,v)
print (a%v)
N = int(input())
MOD = 10**9+7

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

print(ans%MOD)
import sys
input = sys.stdin.readline

n = int(input())
print((10**n - (2*9**n-8 **n)) % (10**9 + 7))
n=int(input())
MOD=10**9+7
ans=pow(10,n,MOD)-2*pow(9,n,MOD)+pow(8,n,MOD)
print(ans%MOD)
m=int(1e9+7)
n=int(input())
ans=pow(10,n,m)-2*pow(9,n,m)+pow(8,n,m)
print(ans%m)
n = int(input())
mod = int(1e9)+7
print((pow(10, n, mod) - 2*pow(9, n, mod) + pow(8, n, mod))%mod)
n = int(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(input())
x = 10 ** n
x -= 2*(9**n)
x += 8**n
x %= 1000000007
print(x)
import sys
import math
sys.setrecursionlimit(10**6)

MOD = 10**9+7


def main(input, print):
    n = int(input())

    ans = 10**n - 9**n - 9**n + 8**n
    ans %= MOD
    print(ans)


if __name__ == '__main__':
    main(sys.stdin.readline, print)
n = int(input())
mod = 10**9 + 7
print((pow(10, n, mod) - 2 * pow(9, n, mod) + pow(8, n, mod)) % mod)
n=int(input())
x=(10**n)%(10**9+7)
y=(9**n)%(10**9+7)
z=(8**n)%(10**9+7)
print((x-2*y+z)%(10**9+7))
n=int(input())
print((10**n-2*(9**n)+8**n)%(10**9+7))
tmp = 10 ** 9 + 7

def div(n,T):
    _ = 1
    for t in range(T):
        _ *= n
        _ %= tmp
    return _
    
N = int(input())
a = div(10,N)
b = div(9,N)
c = div(8,N)

print((a + c - 2 * b) % tmp)
N = int(input())

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

y_d = y % ( 10**9 + 7 )

print(y_d)
def main():
    N = int(input())
    mod = 10 ** 9 + 7
    return (pow(10, N, mod) - pow(9, N, mod) - pow(9, N, mod) + pow(8, N, mod)) % mod

print(main())
N = int(input())
a = 10**N - 9**N -9**N + 8**N
print(a%(10**9+7))
import sys
def input(): return sys.stdin.readline().rstrip()


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


if __name__ == '__main__':
    main()
N = int(input())

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

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

ans = ((((10 ** n) - (9 ** n)) * 2) - ((10 ** n) - (8 ** n))) % (10 ** 9 + 7) 
print(ans)
n = int(input())
k = 1000000007
if n == 1:
  print(0)
  
else:
  print((10**n - 2* 9**n+8**n)%k)
seq = int(input())
a = int(10**9 + 7)
answer = (10**seq - 9**seq - 9**seq + 8**seq)%a
print(answer)
N = int(input())

if N == 1:
    print(0)
    exit()

if N == 2:
    print(2)
    exit()

# N >= 3

# 全事象
all_pattern = 10 ** N

# 0も9もない
pattern_a = 8 ** N

# 0あるが9ない
pattern_b = 9 ** N - 8 ** N

ans = all_pattern - pattern_a - pattern_b * 2
ans = ans % (10**9 + 7)

print(ans)
n = int(input())
a,b,c = 1,1,1
for i in range(n):
  a *= 10
  b *= 9
  c *= 8
  a %= 10** 9 + 7
  b %= 10** 9 + 7
  c %= 10** 9 + 7
print((a - 2 * b +c)%(10** 9 + 7))
print((pow(10,n:=int(input()),M:=10**9+7)-pow(9,n,M)*2+pow(8,n,M))%M)
N=int(input())
M=10**9+7
ans=1
m=1
for i in range(N):ans=(ans*10)%M
for i in range(N):m=(m*9)%M
ans-=(m*2)%M
m=1
for i in range(N):m=(m*8)%M
print((ans+m)%M)
INF = 10 ** 9 + 7
N = int(input())
a = 10**N
b = 9**N
c = 8**N
ans = a -(b + b - c)
ans = ans%INF
print(ans)
a=int(input())

if a<=1:
	print(0)

else:
	n=(10**a)-(9**a)*2+(8**a)
	print(n%1000000007)
n = int(input())

# ぜんぶ
a = 10 ** n
# 0が存在しない
b = 9 ** n
# 9が存在しない
c = 9 ** n
# 0も9も存在しない
d = 8 ** n

ans = a - b - c + d

print(ans % 1000000007)
import sys
sys.setrecursionlimit(10000000)

mod = 10 ** 9 + 7
def pow(a, n):
    if n == 0:
        return 1
    if n == 1:
        return a
    tmp = pow(a, n//2)
    tmp = (tmp * tmp) % mod
    if n % 2 == 1:
        tmp = (tmp * a) % mod
    return tmp

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

print((pow(10,n)- 2*(pow(9,n)) + pow(8,n))%MOD)
MOD=10**9+7
N=int(input())
ans=1
nine=1
eight=1
for i in range(N):
    ans*=10
    ans%=MOD
    nine*=9
    nine%=MOD
    eight*=8
    eight%=MOD
nine*=2
nine%=MOD
ans-=nine
ans%=MOD
ans+=eight
ans%=MOD
print(ans)
def main():
    n = int(input())

    mod = 10**9 + 7

    # すべての組み合わせから、いずれかの条件を満たさないパターンを引く

    pattern = 10 ** n
    not_pattern = (9 ** n) + (9 ** n) - (8 ** n)

    answer = (pattern - not_pattern) % mod

    print(answer)


if __name__ == "__main__":
    main()
n = int(input())

def modpow(a, n, mod):
  res = 1
  while n > 0:
    if n & 1:
      res = res * a % mod
    a = a * a % mod
    n >>= 1
  return res

mod = 1000000007
ans = modpow(10, n, mod) - (modpow(9, n, mod) + modpow(9, n, mod) - modpow(8, n, mod))
ans = ans % mod
print(ans)
N = int(input())

ans = 10 ** N - (9 ** N * 2 - 8 ** N)
print(ans % (10 ** 9 + 7))
N=int(input())
x=(10**N-2*(9**N)+8**N)%(10**9+7)
print(x)
N = int(input())
output = ((10 ** N) - 2 * (9 ** N) + (8 ** N) ) % 1000000007
print(output)
n=int(input())
mod=10**9+7
ans=10**n-2*9**n+8**n
print(ans%mod)
def func(x, n):
  res = 1
  for _ in range(n):
    res = res * x % MOD
  return res

n = int(input())
MOD = 10**9 + 7

ans = func(10, n) - func(9, n) - func(9, n) + func(8, n)
ans %= MOD
print(ans)
n=int(input())
x=pow(10,n,10**9+7)-2*pow(9,n,10**9+7)+pow(8,n,10**9+7)
print(x%(10**9+7))
N = int(input())
if(N>1):
    all = 2**N * ((5**N) + (4**N)) - 2 * (9**N)
else:
    all = 0
print(all % 1000000007)
import sys
input = sys.stdin.readline

N = int(input().rstrip('\n'))
res = 10**N-(9**N)*2 + 8**N
print(res % 1000000007)
n = int(input())
p = 10**9+7
print((pow(10, n, p) - 2*pow(9, n, p) + pow(8, n, p)) % p)
N = int(input())

mod = 10**9+7

if N == 1:
    print(0)
elif N == 2:
    print(2)
else:
    tmp = 2*(pow(10,N,mod)-pow(9,N,mod))-(pow(10,N,mod)-pow(8,N,mod))
    print(tmp%mod)
def main():
  N = int(input())
  a = 1
  b = 1
  c = 1
  mod = (10 ** 9) + 7
  for _ in range(N):
    a = (a * 10) % mod
    b = (b * 9) % mod
    c = (c * 8) % mod
  print((a - (2*b) + c) % mod )
main()
num=int(input())
num2=[10, 9 ,8]

num2a=map(int, num2)

def multi(x):
	y=x**num
	return y


a, b, c=map(multi, num2a)
print((a-2*b+c)%(int(1e9+7)))
mod = 1000000007

n = int(input())

a = 1
b = 1
c = 1
for i in range(n):
    a = a * 10 % mod
    b = b * 8 % mod
    c = c * 9 % mod


d = (a - 2 * c + b + mod) % mod
d = (d + mod) % mod
print(d)
import sys
input = sys.stdin.readline
N = int(input())
if N == 1:
  print(0)
  exit(0)
mod = 10 ** 9 + 7
res = pow(10, N, mod) - pow(9, N, mod) * 2 + pow(8, N, mod)
print(res % mod)
n = int(input())
print((10**n - 2*9**n + 8**n) % (10 ** 9 + 7))
N = int(input())
ans = 0
if N==1:
  ans=0
if N==2:
  ans=2
if 2<N:
    ans=(10**N-2*9**N+8**N)%(10**9+7)
print(ans)
n=int(input())

mod=10**9+7

al=10**n
ex=8**n
a=9**n

x=al-ex

ans=x-(a-ex)*2

print(ans%mod)
n = int(input())

mod = 10**9+7

all = 10**n 

yobun = 9**n + 9**n- 8**n

ans = all-yobun

print(ans % mod)
#!/usr/bin/env python3
import sys

def main():
    input = sys.stdin.readline
    n = int(input())
    mod = 10 ** 9 + 7
    if n == 1:
        print(0)
    elif n == 2:
        print(2)
    else:
        print((pow(10, n, mod) - pow(9, n, mod) * 2 + pow(8, n, mod)) % mod)


if __name__ == '__main__':
    main()
import math
NN = int(input())

def power_func(a,n,p):
    bi = str(format(n,"b"))#2進表現に
    res = 1
    for i in range(len(bi)):
        res = (res*res) %p
        if bi[i] == "1":
            res = (res*a) %p
    return res


a = power_func(10, NN , 10 ** 9 + 7)
b = power_func(9 , NN , 10 ** 9 + 7)
c = power_func(8 , NN , 10 ** 9 + 7)

x = ((a - b - b + c) + 10 ** 9 + 7 + 10 ** 9 + 7 ) % (10 ** 9 + 7)
print(x)
N = int(input())
dp = [0 for j in range(4)]
dp[0] = 1
M = 1_000_000_007;
for i in range(N):
    x = dp[0]
    y = dp[1]
    z = dp[2]
    dp[0] = (x * 8) % M
    dp[1] = (y * 9 + x) % M
    dp[2] = (z * 9 + x) % M
    dp[3] = (dp[3] * 10 + y + z) % M
print(dp[3])
n=int(input())
print((10**n-2*9**n+8**n)%int(1e9+7))
def pow(a, b, mod):
    result = 1
    while b:
        if b&1: result = (result * a) %mod
        a = (a * a) % mod
        b >>= 1
    return result

n = int(input())
if n <= 1:
    print(0)

else:

    mod = 10 ** 9 + 7

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

answer = (pow(10, N, MOD) + pow(8, N, MOD) - 2 * pow(9, N, MOD)) % MOD
print(answer + MOD if answer < 0 else answer)
n = int(input())
if n < 2:
    print('0')
elif n == 2:
    print('2')
else:

    zero = 10 ** n - 9 ** n
    nine = 10 ** n - 9 ** n
    zq = 10 ** n - 8 ** n
    ans = zero + nine - zq
    print(ans % (10 ** 9 + 7))
N=int(input())
MOD=10**9+7

ans=10**N %MOD
ans=ans-2*9**N %MOD
ans=ans+8**N %MOD

print(ans%MOD)
from sys import stdin,stdout
M=10**9+7
n=int(stdin.readline())
# a,b,c,d=list(map(int,stdin.readline().split()))
# pp=int(pow(10,n-2))
# ans=(pp*n*(n-1))
ans=(10**n)-2*(9**n)+(8**n)
print(ans%M)
N = int(input())
ans = (10**N + 8**N - 2*(9**N)) % (10**9 + 7)
print(ans)
n = int(input())
ans = 10**n - 9**n - 9**n + 8**n
print(ans%(10**9 + 7))
int_n = int(input())

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

ans_divide = ans % (10**9 + 7)

print(ans_divide)
n = int(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(input())
print((10**n-9**n-9**n+8**n)%(10**9+7))
n = int(input())
mod = 10**9+7

print((10**n-(9**n+9**n-8**n))%mod)
import sys
N = int(input())
if N == 1:
    print(0)
    sys.exit()
alla = 1
for i in range(N):
    alla = (alla * 10) % (10**9+7)
exi1or9 = 1
for i in range(N):
    exi1or9 = (exi1or9 * 9) % (10**9+7)
exi1and9 = 1
for i in range(N):
    exi1and9 = (exi1and9 * 8) % (10**9+7)
ans = (alla-2*exi1or9+exi1and9) % (10**9+7)
print(ans)
n = int(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(input())
m = 10**9 + 7
print(((10**n) % m - (9**n) % m * 2 + (8**n) % m) % m)
N = int(input())
MOD = 10**9+7

a = 8
b = 1
c = 1
d = 0

for _ in range(N-1):
    at = a * 8
    bt = b * 9 + a * 1
    ct = c * 9 + a * 1
    dt = b * 1 + c * 1 + d * 10
    a = at % MOD
    b = bt % MOD
    c = ct % MOD
    d = dt % MOD

print(d)
import math
import collections
import fractions
import itertools
import functools
import operator
import bisect

N = int(input())

def solve():
    mod = 10**9+7
    ans = 10**N - (9**N)*2 + 8**N
    ans %= mod
    print(ans)
    return 0

if __name__ == "__main__":
    solve()
mod = 10**9+7

N = int(input())
a = 1
b = 1
c = 1
for _ in range(N):
    a *= 10
    b *= 9
    c *= 8
    a %= mod
    b %= mod
    c %= mod

ans = (a -2*b + c)%mod
print(ans)
MOD = int(1e9+7)

N = int(input())
answer = pow(10, N, MOD)
answer -= pow(9, N, MOD) * 2
answer += pow(8, N, MOD)
answer %= MOD
print(answer)
N = int(input())

mod = 10**9+7
def p(a,n):
    ans  = 1
    for i in range (n):
        ans = ans * a % mod
    return ans

print((p(10,N)+p(8,N) - 2* p(9,N))%mod)
N = int(input())

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

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

ans = (10**N - 2*(9**N) + 8**N) % mod
print(ans)
N = int(input())
x = 10 ** 9 + 7
print(((10 ** N) % x - (2 * (9 ** N)) % x + (8 ** N) % x) % x)
import math
import re
#import sympy

#a,b,c,d=map(int,input().split())



war=10**9+7

a=int(input())
if a<2:
    print(0)
    exit()

print((10**a-9**a-9**a+8**a)%war)
n=int(input())

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

numa=num%(10**9+7)

print(numa)
N = int(input())

mod = 10**9 + 7
print((pow(10, N, mod) - 2*pow(9, N, mod) + pow(8, N, mod))%mod)
n = int(input())
print((10**n - 9**n*2 + 8**n) % (10 ** 9 + 7))
N = int(input())
m = 10**9 + 7
def pos(x, n, m):
    if n == 0:
        return 1
    res = pos(x*x%m, n//2, m)
    if n%2 == 1:
        res = res*x%m
    return res
s = pos(10, N, m)
t = pos(9, N, m)
u = pos(8, N, m)
ans = s + u - t - t
ans = ans % m
print(ans)
N = int(input())


num, num2,num3 = 1, 1, 1

for _ in range(N):
    num = num * 10 % 1000000007
    num2 = num2 * 9 % 1000000007
    num3 = num3 * 8 % 1000000007
print((num - num2 * 2 + num3) % 1000000007)
N = int(input())
print((10**N - 2*9**N + 8**N)%1000000007)
n = int(input())
mod = 10 ** 9 + 7
print((pow(10, n, mod) - pow(9, n, mod) - pow(9, n, mod) + pow(8, n, mod)) % mod)
N=int(input())

if N==1:
    print(0)
    exit()

MOD=10**9+7

ALL=pow(10,N,MOD)
No0=pow(9,N,MOD)
No9=pow(9,N,MOD)
No09=pow(8,N,MOD)

ans=ALL-No9-No0+No09+MOD
print(ans%MOD)
N = int(input())
d = 10**9 + 7
print((10**N - 2 * (9**N) + 8**N) % d)
n = int(input())
mod = 10**9+7
dp = [[0]*4 for i in range(n+1)]
dp[0][0] = 1
for i in range(n):
    dp[i+1][3] = (dp[i][3]*10 + dp[i][1] + dp[i][2]) % mod
    dp[i+1][2] = (dp[i][2]*9 + dp[i][0]) % mod
    dp[i+1][1] = (dp[i][1]*9 + dp[i][0]) % mod
    dp[i+1][0] = (dp[i][0]*8) % mod

print(dp[n][3])
N=int(input())

mod=pow(10,9)+7

def pow_method(r,N):
    ans=1
    for i in range(N):
        ans=ans*r%mod
    return ans

calc=pow_method(9,N)+pow_method(9,N)-pow_method(8,N)
ans=pow_method(10,N)-calc
ans=ans%mod
ans=(ans+mod)%mod

print(ans)
n = int(input())

MOD = 1000000007

def mod(n):         
  return n % MOD

def modpow(a, n):   #mod(a**n)を高速で求める
    res = 1  
    digit = len(str(bin(n))) - 2
    for i in range(digit):
      if (n >> i) & 1:
        res *= mod(a)
        res = mod(res)
      a = mod(a**2)
    return mod(res)
  
ans = modpow(10, n)
ans -= 2*modpow(9, n)
ans += modpow(8, n)
print(mod(ans))
N = int(input())

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

print(int(ans))
n = int(input())
p = 10**9+7

##0も9もない
temp = pow(8, n, p)

#0がない
tempp = pow(9,n,p)

#全体
temppp = pow(10,n,p)
    
res = (temppp-tempp*2 + temp) % p

print(res)
import sys, math
from functools import lru_cache
sys.setrecursionlimit(10**9)
MOD = 10**9+7

def input():
    return sys.stdin.readline()[:-1]

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]

def main():
    N = ii()
    ans = pow(10, N, MOD)
    ans -= pow(9, N, MOD)
    ans -= pow(9, N, MOD)
    ans += pow(8, N, MOD)
    print(ans%MOD)

if __name__ == '__main__':
    main()
n=int(input())
c=10**9+7
def pow_c(x,n,c):
    if n == 0:
        return 1
    K = 1
    while n > 1:
        if n % 2 != 0:
            K= (K%c)*(x%c)%c
        x = ((x%c)**2)%c
        n //= 2
    return (K%c) * (x%c) %c

k10=pow_c(10,n,c)
k9=pow_c(9,n,c)
k8=pow_c(8,n,c)
ans=(k10-2*k9+k8)%c 
print(ans)
n = int(input())
print((10 ** n - 2 * 9 ** n + 8 ** n) % (10 ** 9 + 7))
p=10**9+7

n=int(input())

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

n=int(input())
if n==1:
  print(0)
elif n==2:
  print(2)
else:
  f=pow(10,n,inf) - 2*pow(9,n,inf) + pow(8,n,inf)
  print(f%inf)
n=int(input())
mod=pow(10,9)+7
ans=pow(10,n,mod)-2*pow(9,n,mod)+pow(8,n,mod)
print(ans%mod)
N = int(input())
MOD = 10**9 + 7

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

print(ans)
N = int(input())
ans =  10**N -( 9**N + 9**N - 8**N ) 
print( ans%( 10**9 + 7) )
# -*- coding: utf-8 -*-
# C

import sys
from collections import defaultdict, deque
from heapq import heappush, heappop
import math
import bisect
input = sys.stdin.readline

# 再起回数上限変更
# sys.setrecursionlimit(1000000)

mod = 10**9 + 7
n = int(input())

ans = pow(10,n,mod)
ans -= pow(9,n,mod)
ans -= pow(9,n,mod)
ans += pow(8,n,mod)

print(ans % mod)
n = int(input())
mod = 10**9  + 7
if n <= 2:
    print((n-1)*2)
else:
    print((10**n - 9**n - 9**n + 8**n)%mod)
n = int(input())
ten = 1
eight = 1
nine = 1
for i in range(n):
    ten *= 10
    ten = ten%(10**9 + 7)
    eight *= 8
    eight = eight%(10**9 + 7)
    nine *= 9
    nine = nine%(10**9 + 7)
print((ten+eight-(2*nine))%(10**9 + 7))
N = int(input())
A = 1
B = 2
C = 1
mod = 10**9+7
for i in range(N):
  A *= 10
  A %= mod
  B *= 9
  B %= mod
  C *= 8
  C %= mod
ans = (A-B+C)%mod
print(ans)
n = int(input())
mod = 10**9+7
ans = pow(10,n,mod)-pow(9,n,mod)*2+pow(8,n,mod)
print(ans%mod)
n = int(input())
mod = 10**9 + 7
ans = (pow(10, n, mod) - ((2 * pow(9, n, mod)) % mod - pow(8, n, mod) + mod) % mod + mod) % mod
print(ans)
n=int(input())
a=10**n-2*9**n+8**n
print(a%(10**9+7))
##C - Ubiquity
##0と9が一つずつない状況
N = int(input())
print((10**N - 2*9**N + 8**N) % (10**9+7))
N = int(input())
mod = 10 ** 9 + 7

if N == 1:
    print(0)
    exit()

def factorial(p, n):
    result = 1
    for i in range(1, n + 1):
        result = result * p % mod
    return result

ans = factorial(10, N) - 2 * factorial(9, N) + factorial(8, N)
ans = ans % mod

while True:
    if ans > 0:
        break
    ans += mod

print(ans)
num = int(input())
mod = 10 ** 9 + 7
ans = 0
if num >= 2:
    temp9 = (9 ** num) % mod
    temp8 = (8 ** num) % mod
    val = (temp9 * 2 - temp8) % mod
    ans = (10 ** num) % mod + mod - val
print(ans % mod)
mod = 10**9 + 7
N = int(input())
print((pow(10, N, mod) - 2 * pow(9, N, mod) + pow(8, N, mod)) % mod)
import sys
N=int(sys.stdin.readline().strip())
mod=10**9+7
print (pow(10,N,mod)-(pow(9,N,mod)*2-pow(8,N,mod)))%mod
N = int(input())
MOD = 1000000000 + 7
def power_func(a, n, p):
    bi = str(format(n,"b"))#2進表現に
    res = 1
    for i in range(len(bi)):
        res = (res*res) % p
        if bi[i] == "1":
            res = (res*a) % p
    return res
print(str((power_func(10, N, MOD) - 2 * power_func(9, N, MOD) + power_func(8, N, MOD)) % MOD))
n = int(input())
a = 10**9+7
def mod(i,j):
    ans = 1
    for _ in range(j):
        ans = (ans*i)%a
    return(ans)

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

n = int(input())
print((pow(10, max(n, 0), MOD) - pow(9, max(n, 0), MOD) -
       pow(9, max(n, 0), MOD) + pow(8, max(n, 0), MOD)) % MOD)
n = int(input())

# not 0, but 9 == not 9, but 0
#2 * (9 ** n - 8 ** n)

# not 0,9
#8 ** n

# ans = all - (not 0, but 9 + not 9, but 0) - not 0,9
print((10**n - 2 * (9 ** n - 8 ** n) - 8 ** n) %  (10**9 + 7))
import sys


# \n
def input():
    return sys.stdin.readline().rstrip()


def main():
    N = int(input())
    mod = 10 ** 9 + 7

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


if __name__ == "__main__":
    main()
# -*- coding: utf-8 -*-
import math

N = int(input())

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

N = int(input())
if N == 1:
    print(0)
    sys.exit()

p= (-2*9**N+8**N+10**N) % (10**9+7)
print(p)
N = int(input())
mod = 10**9 + 7
ans = pow(10, N, mod)
ans -= 2 * pow(9, N, mod)
ans += pow(8, N, mod)
ans %= mod
print(ans)
N = int(input())
mod = 10**9 + 7
if N < 2:
    print(0)
    exit()
all = pow(10, N, mod)

sabun = pow(9, N, mod) * 2 - pow(8, N, mod)
ans = ((all % mod) - sabun) % mod
print(ans)
# author:  Taichicchi
# created: 13.09.2020 21:21:37

import sys

N = int(input())

MOD = (10 ** 9) + 7

ans = (10 ** N - ((9 ** N) * 2 - (8 ** N))) % MOD

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

a = 0
b = 1
c = 1
d = 8

mod = 10**9 + 7

for _ in range(N-1):
    a = (a * 10 + b + c) % mod
    b = (b * 9 + d) % mod
    c = (c * 9 + d) % mod
    d = (d * 8) % mod
print(a)
n=int(input())
a=(9**n)%(10**9+7)
b=(8**n)%(10**9+7)
c=(10**n)%(10**9+7)
print((c-2*a+b)%(10**9+7))
N = int(input())

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

#0を一回も使わない
no_0 = 9**n

#9を一回も使わない
no_9 = 9**n

#0と9を一回も使わない
no_09 = 8**n

#全体-上記集合
yes_09 = 10**n - (no_0+no_9-no_09)

print(yes_09%(10**9+7))
N = int(input())
ans = (10**N - 2*9**N + 8**N) % (10**9 +7)
print(ans)
#!/usr/bin/env python3

#(a^b) % (1e9 + 7)を求める
def powmod(a, b):
    result = 1;
    for i in range(b):
        result *= a
        result %= 1e9 + 7
    return result


n = int(input())

if n == 1:
    print(0)
elif n == 2:
    print(2)
else:
    # print(10 ** n - 2 * (9 ** n) + 8 ** n)
    r = powmod(10, n) - 2 * powmod(9, n) + powmod(8, n)
    r = int(r % (1e9 + 7))
    print(r)
N = int(input())

print((10**N-2*9**N+8**N)%1000000007)
N = int(input())
mod = 10**9 + 7
u = 1
a = 1
b = 1
for i in range(N):
    u = u * 10
    a = a * 9
    b = b * 8
    u = u%mod
    a = a%mod
    b = b%mod
print((u-2*a+b)%mod)
N = int(input())
MOD_BY = 10**9 + 7
  
a = pow(10,N,MOD_BY)
b = pow(9,N,MOD_BY)
c = pow(8,N,MOD_BY)
ans = a - 2*b + c
print(ans%MOD_BY)
n=int(input())
mod=10**9+7
ans=pow(10,n,mod)-(2*pow(9,n,mod)-pow(8,n,mod))
print(ans%mod)
n=int(input())
mod=(1e+9)+7
x=1
if n>=2:
  ans=1
else:
  ans=0
for i in range(n):
  x*=10
  ans*=8
  ans%=mod
  x%=mod
nin=1

for i in range(n):
  nin*=9
  nin%=mod
x+=ans
x%=mod
x-=(nin*2)%mod
if x<0:
  x+=mod
if n==1:
  print(0)
else:
  print(int(x%mod))
n=int(input())
ans=10**n-2*9**n+8**n
print(ans%(10**9+7))