peterverebics/CodeNet_Python_118 huggingface dataset:
n = int(input())

print((10 ** n - (9 ** n + 9 ** n - 8 ** n)) % (10 ** 9 + 7))
#import 
#=input()
n=int(input())
#=map(int,input().split())
#=list(map(int,input().split()))
#=[list(map(int,input().split())) for _ in range()]

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

e = pow(8, N, mod)
f = pow(9, N, mod)
g = pow(10, N, mod)

# 全体 - (0を含まない + 9を含まない) + 0と9どちらも含まない
ans = (g - 2 * f + e) % mod
print(ans)
N=int(input())
print((pow(10,N)-2*pow(9,N)+pow(8,N))%(pow(10,9)+7))
import sys
import math
input = sys.stdin.readline

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

a= pow(10,n,10**9+7)
b = pow(8,n,10**9+7)
c = pow(9,n,10**9+7)

print((a-2*c+b)%(10**9+7))
import sys
readline = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
#mod = 998244353
INF = 10**18
eps = 10**-7


n = int(readline())

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

print(ans)
# -*- coding: utf-8 -*-
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
MOD = 10**9+7
N = int(readline())
if N == 1:
    print(0)
    sys.exit()
    
a = pow(10,N,MOD)
b = pow(9,N,MOD)
c = pow(8,N,MOD)

ans = ((a-b)*2%MOD - (a-c)%MOD) % MOD

print(ans)
import sys
from heapq import heappush, heappop, heapify
import math
from math import gcd
import itertools as it
from collections import deque 

input = sys.stdin.readline

def inp():
    return int(input())
def inpl():
    return list(map(int, input().split()))
def _dbg(o):
    print(o, file=sys.stderr)

# ---------------------------------------

N = inp()
mod = 10**9 + 7
_dbg(mod)

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

mod = 10 ** 9 + 7

for i in range(64):
    if N % 2:
        TEN *= a
        TEN %= mod
        NINE *= b
        NINE %= mod
        EIGHT *= c
        EIGHT %= mod
    N //= 2
    a *= a
    a %= mod
    b *= b
    b %= mod
    c *= c
    c %= mod

print((TEN - 2 * NINE + EIGHT + mod * 2)%mod)
n = int(input())

ALL = (10 ** n) % (10**9 +7)
wo_0 = (9 ** n) % (10**9 +7)
wo_9 = (9 ** n) % (10**9 +7)
wo_0_9 = (8 ** n) % (10**9 +7)

ans = (ALL - (wo_0 + wo_9 - wo_0_9)) % (10**9 +7)
print(ans)
n = int(input())
mod = 10**9+7
ans = 10**n - 9**n*2 + 8**n
print(ans % mod)
n = int(input())

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

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

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

if n <= 1:
    print(0)
    exit()

nones = 8
zero = 1
nine = 1
other = 0
for x in range(1, n):
    other = other * 10 + zero + nine
    zero = zero * 9 + nones
    nine = nine * 9 + nones
    nones *= 8

    other %= M
    zero %= M
    nine %= M
    nones %= M

print(other)
N = int(input())
# {A:数列に0だけ存在しない集合, B:数列に9だけ存在しない集合}
# 全体集合 - (A + B) + A and B 
ans = (10 ** N - 9 ** N * 2 + 8 ** N) % (10 ** 9 + 7) 
print(ans)
n=int(input())
x=(10**9)+7
a=pow(10,n,x)+pow(8,n,x)-2*pow(9,n,x)

print(a%x)
#import sys
#input = sys.stdin.readline
Q = 10**9+7
def main():
    N = int( input())
    ans = pow(10, N, Q) - pow(9, N, Q)*2 + pow(8, N, Q)
    print( ans%Q)
if __name__ == '__main__':
    main()
from sys import stdin

N = int(stdin.readline())

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

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

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())
print((10**n -2*9**n +8**n) % 1000000007)
N = int(input())
MOD = 1_000_000_007
A = pow(10, N, MOD) - pow(9, N, MOD)
AorB = pow(10, N, MOD) - pow(8, N, MOD)
print( (A * 2  - AorB) % MOD if N > 1 else 0)
n = int(input())
m=int(1e9+7)
print((pow(10,n,m)+pow(8,n,m)-2*pow(9,n,m))%m)
# 整数の入力
N = int(input())
 
print((10 ** N - 2* 9 ** N + 8 ** N) % (10 ** 9 + 7))
N = int(input())

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

print(ans)
N = int(input())
ans = (10**N % (10**9+7)) - (2 * 9**N % (10**9+7)) + (8**N % (10**9+7))
if ans < 0:
  ans += 10**9 + 7
print(ans)
N = int(input())
f = 10**9 + 7
e = n = t = 1
for i in range(N):
    e = (e * 8) % f
    n = (n * 9) % f
    t = (t * 10) % f
ans = (t - 2*n + e) % f
print(ans)
N = int(input())
if N == 1:
    print(0)
elif N == 2:
    print(2)
else:
    a = 10 ** N % (10 **9 + 7)
    m = (9 ** N)  * 2 % (10 **9 + 7) - (8 ** N)  % (10 **9 + 7)
    ans = (a - m ) % (10 **9 + 7)
    print(ans)
n = int(input())
mod = 10**9 + 7
a = (10**n + 8**n - 2*9**n)
print(a%mod)
n = int(input())
w = 1000000007

if(n == 1):
  print(0)
  exit()
if(n == 2):
  print(2)
  exit()
  
ans1 = 1


for i in range(n):
  ans1 = ans1*10%w
  
ans2 = 2

for i in range(n):
  ans2 = ans2*9%w
  
ans3 = 1

for i in range(n):
  ans3 = ans3*8%w

ans = ans1-ans2+ans3
ans %= w
ans += w
ans %= w

print(ans)
N = int(input())
M = 1000000007
t, t1, t2 = 1, 1, 1

for _ in range(N):
    t, t1, t2 = t*10, t1*9, t2*8
    t, t1, t2 = t%M, t1%M, t2%M

print((t - t1*2 + t2) % M)
n = int(input())
mod = 10**9+7
print((10**n-9**n-9**n+8**n)%mod if n >= 2 else 0)
n = int(input())
mod = 10**9 + 7
if n==1:
    print(0)
else:
    #0が入ってるいる個数
    a = pow(10,n,mod) - pow(9,n,mod)
    #9が入っている個数
    b = pow(10,n,mod) - pow(9,n,mod)
    #0か9が入っている
    c = pow(10,n,mod) - pow(8,n,mod)

    ans = (a + b - c)%mod
    print(ans)
N = int(input())
MOD = 10**9 + 7
if N<=1:
  print(0)
  
else:
  all_num = pow(10, N)
  ans = all_num - 2 * pow(9, N) + pow(8, N)
  print(ans%MOD)
N = int(input())
ans = 10**N - 2*(9**N) + 8**N
ans = ans % (10**9+7)
print (ans)
n=int(input())
ans=(10**n-2*(9**n)+8**n)%(10**9+7)
print(ans)
import math
n=int(input())
m=((10**n)-(2*(9**n))+(8**n))%1000000007
print(m)
N=int(input())
x=pow(10,N)-2*pow(9,N)+pow(8,N)
y=x%(pow(10,9)+7)
print(y)
n = int(input())
print((10**n - (2 * (9**n)) + 8**n) % (10**9 + 7))
# C - Ubiquity
def main():
    N = int(input())
    MOD = 10 ** 9 + 7
    res = (10 ** N - 2 * (9 ** N) + 8 ** N) % MOD  # inclusion–exclusion principle
    print(res)


if __name__ == "__main__":
    main()
N = int(input())
print((10**N - 2*9**N + 8**N) % (10**9 + 7))
import math as mt
import sys, string
from collections import Counter, defaultdict
input = sys.stdin.readline

# input functions
I = lambda : int(input())
M = lambda : map(int, input().split())
ARR = lambda: list(map(int, input().split()))
MOD = int(1e9 + 7)

n = I()
if n < 2:
    print(0)
else:
    ans = (10 ** n)  # all comb
    ans %= MOD
    ans -= 2 * (9 ** n)  # without 9 or 0
    ans %= MOD
    ans += 8 ** n  # without 9 and 0
    ans %= MOD
    print(ans)
mod = 10**9+7
N = int(input())

if N <= 1:
  print(0)
else:
  res = (10**N - 8**N - 2 * (9**N - 8**N)) % mod

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

a = 10**n % mod
b = (9**n % mod) *2
c = 8**n % mod

print((a-b+c)%mod)
N = int(input())
mod = 10**9+7

answer_10 = 1
answer_9 = 1
answer_8 = 1

for _ in range(N):
  answer_10 = (answer_10*10)%mod
  answer_9 = (answer_9*9)%mod
  answer_8 = (answer_8*8)%mod

answer = (answer_10 - 2*answer_9 + answer_8)%mod

print(answer)
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)
mod =10**9+7
n=int(input())
answer=10**n-2*9**n+8**n
print(answer%mod)
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())
if n>2:
  N=10**n
  i=9**n
  j=8**n
  k=N-2*i+j
  print(k%(10**9+7))

elif n ==2:
  print(2)

else:
  print(0)
n=int(input())
mod=10**9+7
print((pow(10,n,mod)-2*pow(9,n,mod)+pow(8,n,mod))%mod)
# -*- coding: utf-8 -*-
# 整数の入力
N = int(input())
a = 10**N%(10**9+7)
b = (2*9**N)%(10**9+7)
c = 8**N%(10**9+7)

ans = (a-b+c)%(10**9+7)

# 出力
print("{}".format(ans))
n = int(input())
mod = 10**9 + 7

max = (10**n)%mod
a = 8**n%mod
b = 9**n%mod
no09 = a
nine_in = (b - a)%mod
zero_in = (b - a)%mod

ans = abs((max - no09 - nine_in - zero_in)%mod)
print(ans)
MOD = 10**9 + 7
N = int(input())
if N == 1:
    print(0)
else:
    ans = pow(10, N, MOD) - 2* pow(9, N, MOD) + pow(8, N, MOD)
    print(ans % MOD)
n = int(input())
ans = (10 ** n - (9 ** n + 9 ** n - 8 ** n)) % (10 ** 9 + 7)
print(ans)
N = int(input())
mod = 10**9+7

res = pow(10,N,mod) - 2*pow(9,N,mod) + pow(8,N,mod)

print(res%mod)
N=int(input())

print((10**N-9**N-9**N+8**N)%(10**9+7))
MOD = 10**9 + 7
N = int(input())

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

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

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

All = 10**n % mod
other = (9**n % mod) + (9**n % mod) - (8**n % mod)
print((All - other) % mod)
mod = 10**9+7
N = int(input())

print((pow(10,N,mod)+pow(8,N,mod)-2*pow(9,N,mod))%mod)
import math

n = int(input())

ans = 0
MOD = 10**9 + 7
if (n == 2):
    ans = 2
elif (n < 2):
    ans = 0
else:
    ans = ((10 ** n) - (2 * 9**n) + 8**n) % MOD 
print(ans)
# coding: utf-8
#a, b, c, d = map(int,input().split())
n=int(input())
ans=1
MOD=10**9+7
a=1
b=1
c=1
for i in range(n):
    a*=10
    a%=MOD
    c*=8
    c%=MOD
for i in range(n):
    b*=9
    b%=MOD
print((a-b*2+c)%MOD)
# -*- coding: utf-8 -*-
"""
Created on Sun Sep 13 21:12:17 2020

@author: liang
"""

key = 10**9 + 7
N = int(input())

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

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

n = 10 ** s - 9 ** s - 9 ** s + 8 ** s

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

def pow_by_iter(a, x, p):
    acc = a
    for i in range(1, x):
        acc = (acc * a) % p
    return acc

print((pow_by_iter(10, n, mod)+pow_by_iter(8, n, mod)-pow_by_iter(9, n, mod)-pow_by_iter(9, n, mod))%mod)
N = int(input())
a=(10**N)%(10**9+7)
b=(9**N)%(10**9+7)
c=(8**N)%(10**9+7)
print((a+c-2*b)%(10**9+7))
n = int(input())
m = 10 ** 9 + 7
print((pow(10, n, m) + pow(8, n, m) - 2 * pow(9, n, m)) % m)
N = int(input())

out = 2 * (10**N - 9**N) - (10**N - 8**N)
out %= (10**9 + 7)
print(out)
n = int(input())
ans =(10**n + 8**n -2*(9**n)) % (10**9+7)
print(ans)
n = int(input())
MOD = int(1e9 + 7)

a, b, c = 1, 1, 1

for i in range(n):
    a *= 10;
    b *= 9;
    c *= 8;
    a %= MOD;
    b %= MOD;
    c %= MOD;
    
print((a - 2 * b + c) % MOD);
from sys import stdin
INF = 10**9 + 7
n = int(stdin.readline().rstrip())
ten = 1
nine = 1
eight = 1
for x in range(n):
    ten = (ten * 10) % INF
    nine = (nine * 9) % INF
    eight = (eight * 8) % INF
ans = (((ten + eight) % INF) - ((2 * nine) % INF)) % INF
if ans < 0:
    ans += INF
print(ans)
mod = 10**9+7
N = int(input())
ans = (pow(10,N,mod) - 2*pow(9, N, mod) + pow(8, N, mod))%mod
if ans < 0:
    ans += mod
print(ans)
n = int(input())
ans = 10**n - (9**n + 9**n - 8**n)
ans %= 10**9+7
print(ans)
n = int(input())
mod = 10**9+7

if n==1:
    print(0)
else:
    print(((10**n)-(9**n)-(9**n)+(8**n))%mod)
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
  
n = int(input())
x = power_func(10, n, (10**9 + 7))
y = power_func(8, n, (10**9 + 7))
z = power_func(9, n, (10**9 + 7))
print((x + y - 2 * z) % (10**9 + 7))
n=int(input())
mod=10**9+7
ans=1
for i in range(n):
    ans*=10
    ans%=mod
tmp=1
for i in range(n):
    tmp*=9
    tmp%=mod
ans-=2*tmp
ans%=mod
tmp=1
for i in range(n):
    tmp*=8
    tmp%=mod
ans+=tmp
ans%=mod
print(ans)
n = int(input())
mod = 1000000007
ans = 10**n - 2*(9**n) + 8**n
print(ans % mod)
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())
if  N == 1:
    print(0)
else:
    print((10**N-2*9**N+8**N) % (10**9+7))
import sys
def input(): return sys.stdin.readline().strip()
mod = 10**9+7

def main():
    N = int(input())
    if N == 1:
        print(0)
        return

    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)
ans -= pow(9,N,mod)
ans -= pow(9,N,mod)
ans += pow(8,N,mod)
ans %= mod
print(ans)
'''
Created on 2020/09/13

@author: okazakieiichiro
'''
d = 10 ** 9 + 7
n = int(input())

ret = None
if n < 2:
    ret = 0
elif n == 2:
    ret = 2
else:
    ret = 10 ** n + 8 ** n - 2 * 9 ** n
ret %= d
print(ret)
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())

if N <= 1:
    print(0)
else:
    ans = 10**N - 2*9**N + 8**N
    print(ans%(10**9 + 7))
m = 1000000007

N = int(input())

print((pow(10, N, m) - pow(9, N, m) * 2 + pow(8, N, m)) % m)
N = int(input())
ans = 10**N -9**N *2 + 8**N
ans %= (10**9+7)
print(ans)
n=int(input())
v=10**n-(2*9**n)+(8**n)
print(v%1000000007)
MOD = 10**9+7
N = int(input())
if N < 2:
    print(0)
else:
    ans = pow(10, N, MOD)
    ans = ans - pow(9, N, MOD)*2+pow(8, N, MOD)
    print(ans % MOD)
N = int(input())
ans = (10**N - 2*(9**N) + 8**N) % (10**9+7)
print(ans)
## coding: UTF-8

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

#print(-3%mod)


ten = 1
nine = 1
eight = 1

if(N == 1):
    print(0)
else:
    for i in range(N):
        ten *= 10 
        ten %= mod
        nine *= 9
        nine %= mod
        eight *= 8
        eight %= mod
        ret = ten + eight - 2* nine
    print(ret % mod)
n=int(input())
o=10**n + 8**n - 2*9**n
print(o%(10**9 +7))
n = int(input())
MOD = 1000000007
print((pow(10, n) - pow(9, n)*2 + pow(8, n))%MOD)
mod=10**9+7
n=int(input())
if n==1:print(0);exit()
ans=pow(10,n,mod)
anss=pow(9,n,mod)
ansss=pow(8,n,mod)
print((ans-anss*2+ansss)%mod)
n=int(input())
x=8**n-2*9**n+10**n
print(x%(10**9+7))
MOD = 10 ** 9 + 7
N = int(input())

Sall = pow(10, N, MOD)
S0 = S9 = pow(9, N, MOD)
S09 = pow(8, N, MOD)

ans = (Sall - (S0 + S9 - S09)) % MOD
print(ans)
n = int(input())

#a(1) : 0
#a(2) : 2
#a(3) : ( 3*10 - 2 ) * 2 - 2 = 54
#a(4) : 
  
#10**n - 8**n - 2*( 9**n - 8**n ) = 10**n - 2* (9**n) + 8**n

p = 10**n - 2* (9**n) + 8**n
p = p%(10**9 + 7)
print(p)
n = int(input())
c = 10**9 +7
print((10**n - 9**n - 9**n + 8**n) % c)
N=int(input())
num=10**N-2*9**N+8**N
num=num%(10**9+7)
print(num)
import sys

sys.setrecursionlimit(1000000)

import bisect
import math
import collections
import heapq

M = 10 ** 9 + 7

def solve(N):
    if N == 1:
        return 0
    if N == 2:
        return 2
    else:
        ans = pow(10, N, M)
        ans -= pow(9, N, M) * 2
        ans += pow(8, N, M)
    return ans
if __name__ == "__main__":
    N = int(input())
    print(solve(N) % M)
import itertools
n = int(input())
if n == 1 :
    ans = 0
elif n == 2 :
    ans = 2
else :
    ans = 10**n - (9**n)*2 + 8**n


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

mod = 10**9+7

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

# (0も9もある) = (全体) - (0がある/9がない) - (9がある/0がない) - (0も9もない)
ans = powmod(10, N) - powmod(9, N) - powmod(9, N) + powmod(8, N)
ans %= mod

print(ans)
N = int(input())
MOD = 10**9 + 7

if N == 1:
    print(0)
    exit()
else:
    ans = pow(10, N, MOD) - 2 * pow(9, N, MOD) + pow(8, N, MOD)
    ans %= MOD
    print(ans)
import sys
def input():
    return sys.stdin.readline()[:-1]


def main():
    n = int(input())
    ans = (10 ** n - 2 * (9 ** n) + 8 ** n) % (10 ** 9 + 7)
    print(ans)
    
if __name__ == "__main__":
    main()
def modexp(a,b,mod):
    if b==0:
        return 1
    elif b%2==0:
        x=modexp(a%mod,b//2,mod)%mod
        return (x*x)%mod
    else:
        return ((a%mod)*(modexp(a%mod,b-1,mod)%mod))

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

ans = pow(10, n, mod) - 2 * pow(9, n, mod) + pow(8, n, mod)
if ans < 0:
  while ans < 0:
    ans += mod
else:
  ans %= mod

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

ans = 10**n - (9**n + 9**n - 8**n)
ans %= mod
print(ans)
flow = 1000000007
n = int(input())
x = (10 ** n)  % flow
y = (9 ** n) % flow
y = (y * 2) % flow
z = (8 ** n) % flow
print((x - y + z) % flow)
n = int(input())
mod = 10**9 + 7
a = 1
for i in range(n):
    a *= 10
    a %= mod
b = 1
for i in range(n):
    b *= 9
    b %= mod
b *= 2
b %= mod
c = 1
for i in range(n):
    c *= 8
    c %= mod
print((a - b + c) % mod)
N = int(input())

sousuu = 10 ** N
not9 = 9 ** N
not0 = 9 ** N
not09 = 8 ** N
print((sousuu - not9 - not0 + not09) % (10 ** 9 + 7))
N=int(input())
if N==1:
    print(0)
    exit(0)

MOD=10**9+7

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

b*=2%MOD
if a+b-c>=0:
    print((a-b+c)%MOD)
else:
    print((a-b+c+MOD)%MOD)
N = int(input())
d = 10**9+7

if N ==1:
    print(0)
else:
    print((10**N - 2*9**N + 8**N) % d)
n = int(input())
mod = 10**9+7
print((pow(10,n,mod)-pow(9,n,mod)*2+pow(8,n,mod))%mod)
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N = int(readline())

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

    return


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

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

if n == 1:
  print(0)
elif n == 2:
  print(2)
else:
  a = 10 ** n % mod
  b = 9 ** n % mod
  c = 8 ** n % mod
  ans = a - 2 * b + c
  ans %= mod
  print(ans)
MOD = 10**9 + 7


def main():
    N = int(input())
    if N == 1:
        print(0)
        return
    ans = pow(10, N, MOD) - (pow(9, N, MOD) + pow(9, N, MOD) - pow(8, N, MOD))
    ans %= MOD
    print(ans)


if __name__ == '__main__':
    main()
N = int(input())
mod = 1000000007
if N == 1:
    print(0)
else:
    a = 10 ** N % mod
    b = 9 ** N % mod
    c = 8 ** N % mod
    print((a - 2 * b + c) % mod)
N = int(input())
ans = 0

if N == 1:
    ans = 0
elif N == 2:
    ans = 2
else:
    ans = (10**N + (8**N) -2*(9**N)) % (10**9 + 7)

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

ten = 1
for i in range(n):
    ten *= 10
    ten %= r

nine = 1
for i in range(n):
    nine *= 9
    nine %= r

eight = 1
for i in range(n):
    eight *= 8
    eight %= r

print((ten - 2 * nine + eight) % r)
n=int(input())
x=(10**n - (9**n + 9**n - 8**n))%(10**9 + 7)
print(x)
N = int(input())
mod = 10**9+7
a = pow(10, N) - pow(8, N)
b = 2*(pow(9, N) - pow(8, N))
ans = (a-b)%mod
print(ans)
n=int(input())

print((10**n-2*(9**n)+8**n)%(10**9+7))
import sys
def I(): return int(sys.stdin.readline().rstrip())


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

m = 10**9+7

a = 10 ** n

b = 9 ** n

c = 9 ** n

d = 8 ** n

ans = (a-(b+c-d)) % m

print(ans)
m=10**9+7
def power(a,b):
    res=1
    while(b>0):
        if(b&1):
            res=(res*a)%m
        b//=2
        a=(a*a)%m
    return res
n=int(input())
s=(power(10,n)+power(8,n))%(10**9+7)
s=(s-(2*power(9,n)))%(10**9+7)
print((s))
N = int(input())
x = (10**N - 2 * 9**N + 8**N) % 1000000007
print(x)
n = int(input())
mod = 10**9+7
a = pow(10,n,mod)
b = pow(9,n,mod)
c = pow(9,n,mod)
d = pow(8,n,mod)
print((a-b-c+d)%mod)
def main():
    s = int(input())
    mod = 10**9+7

    ans = (10**s - 2 * 9 ** s + 8 ** s) % mod
    print(ans)


if __name__ == "__main__":
    main()
mod = 1000000007
def ff(a, b):
  ans = 1
  while b:
    if b & 1: ans = ans * a % mod
    b >>= 1
    a = a * a % mod
  return ans
n=int(input())
print(((ff(10,n)-2*ff(9,n)+ff(8,n))%mod+mod)%mod)
N = int(input())
MOD = 1_000_000_007
ans = pow(10, N, MOD)
ans -= 2 * pow(9, N, MOD)
ans %= MOD
ans += pow(8, N, MOD)
ans %= MOD
print(ans)
n = int(input())

if n == 1:
    print(0)
elif n == 2:
    print(2)
else:
    x = (10 ** 9) + 7
    a = (10 ** n) % x
    b = (9 ** n) % x
    c = (8 ** n) % x
    y = a - b * 2 + c
    if y < 0:
        y += x
    y %= x
    print(y)
n=int(input())
a=1
b=1
c=1
mod=10**9+7
for i in range(n):
    a=a*8%mod
    b=b*9%mod
    c=c*10%mod
print((a-2*b+c+2*mod)%mod)
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())

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

print(ans)
N = int(input())

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

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

p_all = 10 ** N
p_no0 = 9 ** N
p_no9 = 9 ** N
p_no09 = 8 ** N

ans = (p_all - p_no0 - p_no9 + p_no09) % (10 ** 9 + 7)

print(ans)
m=10**9+7
n=int(input())
a=(8**n)%m
b=(9**n)%m
c=(10**n)%m
print((c-2*b+a)%m)
n = int(input())
ans = 10**n
tmp = (9**n)*2 - 8**n
ans -= tmp
print(int(ans%1000000007))
from scipy.special import comb



N=int(input())

if N==1:
  print(0)
else:
  print((10**N-2*(9**N)+8**N)%(10**9+7))
N = int(input())

MOD = 1_000_000_007
a, b, c, d = 8, 1, 1, 0
for i in range(N - 1):
    a, b, c, d = 8 * a, a + 9 * b, a + 9 * c, b + c + 10 * d
    a %= MOD
    b %= MOD
    c %= MOD
    d %= MOD
print(d)
def solve():
    N = int(input())

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

solve()
n = int(input())
a = (10**n) % (10**9+7)
b = (9**n) % (10**9+7)
c = (8**n) % (10**9+7)
print((a-2*b+c) % (10**9+7))
N = int(input())
mod = 10**9+7
no1 = 1
no19 = 1
ans = 1
for i in range(N):
  no1*= 9
  no1 %= mod
  no19 *= 8
  no19 %= mod
  ans *= 10
  ans %= mod
print((ans - no1*2 + no19)%mod)
N = int(input())
mod = 10**9+7

if N==1:
    print(0)
elif N ==2:
    print(2)
else:
    ans2 = 0
    ans1 = 2
    ans0 = 8
    
    for i in range(N-1):
        ans2 = ans2*10 + ans1*1
        ans1 = ans1*9 + ans0*2
        ans0 = ans0*8
        ans2 %= mod
        ans1 %= mod
        ans0 %= mod
        
    print(ans2)
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())
print((10**n - 9**n - 9**n + 8**n)%(10**9+7))
def main():
  n = int(input())
  
  if n == 1: return 0
  if n == 2: return 2
  
  mod = 10**9 + 7

  n_10 = pow(10, n, mod)
  n_9 = pow(9, n, mod)
  n_8 = pow(8, n , mod)
  
  ans = (n_10 - 2*n_9 + n_8) % mod
  
  return ans
  
  
ans = main()
print(ans)
N = int(input())
MOD = 10**9+7
t = (10**N)-(9**N)-(9**N)+(8**N)
print(t%MOD)
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

mod = 10**9+7
# m**n
def modpow(m,n,mod=1000000007):
    res = 1
    while n>0:
        if n&1: res = res * m % mod
        m = m * m % mod
        n >>= 1
    return res

n = ii()

b = modpow(10,n)
s = modpow(8,n)
m = modpow(9,n)

ans = b - s - 2*(m-s)

print(ans%mod)
import os
import sys
import math
import heapq
from decimal import *
from io import BytesIO, IOBase
from collections import defaultdict, deque

def r():
    return int(input())
def rm():
    return map(int,input().split())
def rl():
    return list(map(int,input().split()))

n = r()
tens=1
nines=1
eights=1
mod = 10**9+7
for i in range(n):
    tens=(tens*10)%mod
    nines=(nines*9)%mod
    eights=(eights*8)%mod
print((tens-2*nines+eights)%mod)
n=int(input())
if n==1:
    print(0)
else:
    print((10**n-2*9**n+8**n)%(10**9+7))
N = int(input())
MOD = 10 ** 9+7


print((10 ** N - (9 ** N ) * 2 + 8 ** N)%MOD)