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

num1 = 10**n % (10**9 + 7)
num2 = (9**n * 2) % (10**9 + 7)
num3 = 8**n % (10**9 + 7)

print((num1 - num2 + num3) % (10**9 + 7))
N = int(input())

mod = 10**9 + 7

if N < 2:
    print(0)
else:
    #9がない
    no9 = 1
    no09 = 1
    tot = 1
    for i in range(N):
        no9 *= 9
        no9 %= mod
        no09 *= 8
        no09 %= mod
        tot *= 10
        tot %= mod
    print((tot - 2 * no9 + no09) % mod)
n = int(input())
mod = 10**9+7
part1 = 10 **n 
part2 = 8 ** n
part3 = 2 * (9 ** n) #-
part1 %= mod
part2 %= mod
part3 %= mod
print((part1 +part2 - part3)%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)
MOD = int(1e9 + 7)
n=int(input())
ans = 10 ** n % MOD
ans -= 2 * 9 ** n % MOD
ans += 8 ** n % MOD
ans %= MOD
print(ans)
n = int(input())
print((10 ** n - 2 * 9 ** n + 8 ** n)%(10**9+7))
#: Author - Soumya Saurav
import sys,io,os,time
from collections import defaultdict
from collections import Counter
from collections import deque
from itertools import combinations
from itertools import permutations
import bisect,math,heapq
alphabet = "abcdefghijklmnopqrstuvwxyz"

input = sys.stdin.readline

########################################

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





'''
# Wrap solution for more recursion depth
#submit as python3
import collections,sys,threading
sys.setrecursionlimit(10**9)
threading.stack_size(10**8)



threading.Thread(target=solve).start()
'''
N=int(input())
if N==1:
  print(0)
elif N==2:
  print(2)
else:
  print((10**N-2*(9**N)+8**N) % (10**9+7))
import sys

sys.setrecursionlimit(10 ** 7)

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(input())

MOD = 10 ** 9 + 7

ALL = pow(10, N, MOD)
ONE = pow(9, N, MOD)
TWO = pow(8, N, MOD)

ans = ALL - ONE - ONE + TWO
ans %= MOD

print(ans)
def main():
  N=int(input())
  m=int(1e9+7)
  print((pow(10,N,m)-pow(9,N,m)-pow(9,N,m)+pow(8,N,m))%m)
if __name__=='__main__':
  main()
n = int(input())

mod = 10**9+7

ans = pow(10,n,mod) - (pow(9,n,mod) + pow(9,n,mod) - pow(8,n,mod))
ans %= mod
print(ans)
def powmod(a, n, p):
    if(n==0):
        return 2
    elif(n==1):
        return a%p
    elif(n%2==1):
        return ((a%p)*(powmod(a,n//2,p)**2%p))%p
    elif(n%2==0):
        return powmod(a,n//2,p)**2%p
N=int(input())
p=10**9+7
if(N==1):
    print(0)
else:
    print((powmod(10,N,p)-2*powmod(9,N,p)+powmod(8,N,p))%p)
#C
from math import factorial
N=int(input())
p=10**9+7
# fac=[1]

# for i in range(1,N+1):
#     fac.append( (fac[-1]*i)%p)
    
if N==1:
    ans=0
else:
    total = pow(10,N,p)
    #0がない
    no_zero = pow(9,N,p)
    no_nine = pow(9,N,p)
    no_both = pow(8,N,p)
    ans= total-(no_zero+no_nine)+no_both
    ans %= p
    #print(total,no_zero,no_both)

print(ans)
n=int(input())
a=pow(10,n)
b=pow(9,n)
c=pow(8,n)
print((a-b-b+c)%1000000007)
# import numpy as np
import sys, math, heapq
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial, gcd
from bisect import bisect_left, bisect_right

sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7
input = lambda: sys.stdin.readline()[:-1]
pl = lambda x: print(*x, sep="\n")

N = int(input())

res = pow(10, N, MOD) - (2 * pow(9, N, MOD) - pow(8, N, MOD))
res %= MOD
print(res)
n=int(input())
P=10**9+7
ans=10**n-2*(9**n)+8**n
print(ans%P)
import sys; input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
from collections import defaultdict
mod = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

def inverse(N, mod):
	return (pow(N, mod - 2, mod))

def main():
	N = int(input())
	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
def f(x, y): return pow(x, y, MOD)
print((f(10, N) - f(9, N) - f(9, N) + f(8, N) + MOD) % MOD)
n=int(input())

print((10**n-9**n-9**n+8**n)%(10**9+7))
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

mod = 10**9+7
n = int(readline())
a = 10 ** n % mod
b = 9 ** n % mod
c = 8 ** n % mod

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

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

if n == 1:
    print(0)
elif n == 2:
    print(2)
else:
    print(((10**n)-2*(9**n)+(8**n))%mod)
n=int(input())
print((10**n-((9**n)*2-8**n))%(10**9+7))
from sys import stdin
rs = lambda : stdin.readline().strip()
ri = lambda : int(rs())
ril = lambda : list(map(int, rs().split()))

MOD = 1_000_000_007

def pow(a, b):
    ret = 1
    while b > 0:
        if (b & 1) == 1:
            ret = ret * a % MOD
        a = a * a % MOD
        b >>= 1
    return ret

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



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

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

MOD = 1000000007

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

a =  10 ** n - 9 ** n * 2 + 8 ** n 
print(a %(10 ** 9 + 7))
MOD=10**9+7

def modpow(a,n):
    r=1
    while n > 0:
        if n%2==1:
            r = r*a%MOD
        a = a*a % MOD
        n = n//2
    return r

N=int(input())
a10N=modpow(10,N)
a9N=modpow(9,N)
a8N=modpow(8,N)
ans=a10N-(a8N+2*(a9N-a8N))
ans%=MOD
print(ans)
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())
md = 10 ** 9 + 7
s = 10 ** N
p = 9 ** N
d = 8 ** N
an = s - 2 * p + d
ans = an % md 
print(ans)
n = int(input())
mod = 10**9 + 7
print((pow(10, n, mod) -2 *pow(9, n, mod) +pow(8, n, mod)) % mod )
def power(x, n, mod):
    ans = 1
    while n > 0:
        if n % 2 == 1:
            ans = ans * x % mod
        n //= 2
        x = x * x % mod
    return ans

n = int(input())
mod = 10 ** 9 + 7
print((power(10, n, mod) - 2 * power(9, n, mod) + power(8, n, mod)) % mod)
#C
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)
mod = 10**9 + 7

N = int(input())
A = 10 ** N
B = 8 ** N
C = 10 ** N - 9 ** N
D = C * 2 - A + B
print(D % mod)
N=int(input())
a=1
b=1
c=1

for i in range(N):
    a=(a*10)%(10**9+7)
for j in range(N):
    b=(b*8)%(10**9+7)
for k in range(N):
    c=(c*9)%(10**9+7)

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

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

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

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

print(ans)
MOD = 1000000007
def powmod(x, y):
  res = 1
  for i in range(y):
    res = res * x % MOD
  return res

n = int(input())
ans = powmod(10, n) - powmod(9, n) - powmod(9, n) + powmod(8, n)
ans = ans % MOD
ans = (ans + MOD) % MOD
print(ans)
n=int(input(""))
a=1
b=2
c=1
while(n>10):
    n-=10
    a*=10**10
    b*=9**10
    c*=8**10
    a%=(10**9+7)
    b%=(10**9+7)
    c%=(10**9+7)

    
for i in range(n):
    a*=10
    b*=9
    c*=8
    if(i%10==0):
        a%=(10**9+7)
        b%=(10**9+7)
        c%=(10**9+7)

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

kyuN = 9**N
hachN= 8**N
jyuN=10**N


S = jyuN - (kyuN*2-hachN)
print(S%(1000000000+7))
from sys import stdin

readline = stdin.buffer.readline
read = stdin.buffer.read
def i_input(): return int(input().rstrip())
def i_map(): return map(int, input().rstrip().split())
def i_list(): return list(i_map())

MOD = 10 ** 9 + 7
def main():
    N = i_input()
    print((pow(10, N, MOD) - pow(9, N, MOD) * 2 + pow(8, N, MOD)) % MOD)

if __name__ == "__main__":
    main()
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())
print((10**N+8**N-2*(9**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)
print(ans%mod)
mod = pow(10, 9) + 7
def powmod(x, y):
    res = 1
    for i in range(y):
        res = res * x % mod
    return res

n = int(input())
ans = powmod(10, n) - powmod(9, n) - powmod(9, n) + powmod(8, n)
ans %= mod
ans = (ans + mod) % mod
print(ans)
m = 10**9 + 7
def powmod(x,y):
  a=1
  for i in range(y):
    a=(a*x)%m
  return a
n=int(input())
s=powmod(10,n)-2*powmod(9,n)+powmod(8,n)
print((s+m)%m)
n = int(input())

a = ((10**n-(9**n+9**n-8**n)) % (10**9+7))
print(a)
def I(): return int(input())
def LI(): return list(map(int,input().split()))
def MI(): return map(int,input().split())
def LLI(n): return [list(map(int, input().split())) for _ in range(n)]
mod = 10**9+7
n = I()
if n == 1:
  print(0)
else:
  ##（すべての順列）-（0をつかってないもの）-（9をつかってないもの）+（0も9もつかってないもの）
  print((10**n-2*9**n+8**n)%mod)
prime = 10 ** 9 + 7
n = int(input())
ans = 10 ** n - (9 ** n) * 2 + 8 ** n
ans %= prime
print(ans)
N = int(input())
ans = (10**N-2*9**N+8**N)%(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())
mod = 10**9+7
ans = 10**n-9**n-9**n+8**n
ans %= mod
print(ans)
n = int(input())
print((10 ** n - 2 * 9 ** n + 8 ** n) % (1000000007))
N = int(input())
m = 10**9+7
ans = pow(10, N, m)
ans = (ans-2*pow(9, N, m)) % m
ans = (ans+pow(8, N, m)) % m
print(ans)
mod = 10**9 + 7
def main():
  n = int(input())
  ans_every = 1
  ans_0 = 1
  ans_0_9 =  1
  for i in range(n):
    ans_every *= 10
    ans_every %= mod
    
    ans_0 *= 9
    ans_0 %= mod
    
    ans_0_9 *= 8
    ans_0_9 %= mod
  print((ans_every-(ans_0*2 -ans_0_9))%mod)
  
if __name__ == "__main__":
  main()
n = int(input())
mod = 10**9+7

if n<2:
  print(0)
else:
  print(((10**n-9**n)%mod-(9**n-8**n)%mod)%mod)
N=int(input())
p=10**9 +7
E=10**N
T=(8**N) + ((E-9**N)*2)
print((-(E-T))%p)
n = int(input())
if n == 1:
    print(0)
    exit()

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

N = int(input())

mod = 1e9+7

ten = 1
nine = 1
eight = 1

for _ in range(N):
    ten *= 10
    ten %= mod
    nine *= 9
    nine %= mod
    eight *= 8
    eight %= mod

ans = ten - 2 * nine + eight
ans = int(ans)
ans %= mod
if ans < 0:
    ans += mod

print(int(ans))
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time, copy

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

n = ni()
if n == 1:
    print(0)
else:
    print((pow(10, n, mod)-(2 * pow(9, n, mod) - pow(8, n, mod))) % mod)
n = int(input())
k = 1000000007
print(((10**n)%k - (2* 9**n)%k+(8**n)%k)%k)
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 == 1:
    print(0)
    
else:
    s=10**N + 8**N - 2*(9**N)
    print(s%1000000007)
n=int(input())

#0-9
#1-9のみ
a8=1
a9=1
a10=1
for i in range(n):
    a8=(a8*8)%(10**9+7)
    a9=(a9*9)%(10**9+7)
    a10=(a10*10)%(10**9+7)
#0-8のみ
print((a10-(2*a9-a8))%(10**9+7))
MOD = 10**9 + 7

N = int(input())

x = pow(10, N, MOD)
x -= pow(9, N, MOD) * 2
x += pow(8, N, MOD)
print(x % MOD)
n=int(input())
n2=10**n
n3=8**n
n4=9**n
n5=n4-n3
print((n2-n3-n5-n5)%(10**9+7))
MOD = 10 ** 9 + 7

n = int(input())

x = pow(10, n, MOD)
y = pow(9, n, MOD)
z = pow(8, n, MOD)

ans = (((x - ((2 * y) % MOD) + MOD) % MOD) + z) % MOD

print(ans)
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())

mod = 10**9 + 7

total = pow(10, N, mod)
not_0 = pow(9, N, mod)
not_9 = not_0
not_9_and_0 = pow(8, N, mod)

ans = ( total - (not_0 + not_9 - not_9_and_0) ) % mod

print(ans)
n = int(input())
nAll = 10**n
nOne = 2*(9**n)
nBoth = 8**n
print((nAll - nOne + nBoth)%(10**9+7))
# coding: utf-8


def solve(*args: str) -> str:
    n = int(args[0])
    mod = 10**9+7

    return str((pow(10, n, mod)-2*pow(9, n, mod)+pow(8, n, mod)) % mod)


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))
mod=10**9+7
n=int(input())
print((pow(10,n,mod)-2*pow(9,n,mod)+pow(8,n,mod))%mod)
from scipy.special import comb
def main():
    n = int(input())
    # sum = 0
    # for i in range(1, n):
    #     sum += comb(n, i, exact=True)
    # sub = (n-2)*sum
    # ans = n*(n-1)*(10**(n-2))-sub
    ans = 10**n - 2*(9**n) + 8**n
    print(int(ans%((10)**9+7)))
if __name__ == '__main__':
    main()
n = int(input())
ans_max = 1
for i in range(n):
    ans_max = ans_max * 10 % 1000000007

ans_mid = 1
for i in range(n):
    ans_mid = ans_mid * 9 % 1000000007
ans_mid = ans_mid * 2 % 1000000007

ans_min = 1
for i in range(n):
    ans_min = ans_min * 8 % 1000000007
ans = (ans_max - (ans_mid - ans_min)) % 1000000007
print(ans)
n=int(input())
kotae=(10**n-2*(9**n)+(8**n))%(10**9+7)
print(kotae)
mod = 10**9+7
N = int(input())
p = pow(10, N, mod)
q = pow( 9, N, mod)
r = pow( 8, N, mod)
print((p-q*2+r)%mod)
N = int(input())
M = 10 ** 9 + 7
set1 = (9 ** N) % M
set2 = (10 ** N) % M
set3 = (8 ** N) % M
tmp = (set2 + set3)% M
tmp = (tmp - set1)% M
print((tmp - set1)% M)
N = int(input())
print((-2*9**N+8**N+10**N)%(10**9+7))
N = int(input())
MOD = 10**9 + 7

c = 1
c0 = 0
c1 = 0
c01 = 0

for _ in range(N):

    c01 = (c0+c1+c01*10)%MOD
    c0 = (c + c0*9)%MOD
    c1 = (c + c1*9)%MOD
    c = (c*8)%MOD

print(c01)
def main(N):
    if N==1:
        return 0
    elif N==2:
        return 2
    else:
        return (10**N - (9**N*2 - 8**N))%(10**9 + 7)

if __name__ == '__main__':
    N = int(input())
    ans = main(N)
    print(ans)
n=int(input())
if n==1:
    print(0)
    exit()
no09=8**n
no0=9**n
print((10**n-9**n-(no0-no09))%(10**9+7))
N = int(input())
mod = 10**9+7
ans = (pow(10,N,mod) +pow(8,N,mod) - 2*pow(9,N,mod)) % mod
if ans < 0:
    ans += mod
print(ans)
n=int(input())
mod=10**9+7
e=pow(8,n,mod)
f=pow(9,n,mod)

g=pow(10,n,mod)
print((g-2*f+e)%mod)
n = int(input())
print((10**n - 2*9**n + 8**n)%(10**9+7))
# Aiは1桁の非負の整数
# Ai==0がある
# Ai==9がある

# 10通りある

mod = 10**9+7
N = int(input())
# 全てのパターンから，0がないパターン - 9がないパターン + 0も9もないパターン
# pow(base, exp, mod])  # modはoptional
ans = pow(10, N, mod) - pow(9, N, mod) - pow(9, N, mod) + pow(8, N, mod)
print(ans%mod)
n = int(input())
if n ==1:
  print(0)
  exit()
  
mod = 10**9 + 7  
c = 10**n + 8**n
d = 9**n + 9**n
print((c-d)%mod)
n = int(input())
mod = 10**9+7
ans = pow(10,n,mod)-pow(9,n,mod)-(pow(9,n,mod)-pow(8,n,mod))
ans %= mod
print (ans)
import numpy as np

n = int(input())

div=1000000007

loop=(n)//10
amari=(n)%10

mod1=1
mod2=1
mod3=1
for i in range(0,loop):
  mod1=(mod1*(10**10 % div) ) % div
  mod2=(mod2*(9**10 % div) ) % div
  mod3=(mod3*(8**10 % div) ) % div
mod1=mod1*(10**amari % div)
mod2=mod2*(9**amari % div)
mod3=mod3*(8**amari % div)

#print (loop, amari)
#print (mod1, mod2, mod3)
print((((mod1-mod2*2))+mod3) % div)
n=int(input())

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

mod=10**9+7
ans=pow(10,n,mod) - pow(9,n,mod)- pow(9,n,mod)+ pow(8,n,mod)
print(ans%mod)
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().rstrip())
if n==1:
    print(0)
else:
    MOD = 1_000_000_007
    a = 1
    b = 1
    c = 1
    for i in range(n):
        a = (a*10)%MOD
        b = (b*9)%MOD
        c = (c*8)%MOD
    print((a-b-b+c+MOD+MOD)%MOD)
def bekijou(a,x):
  MOD = 1000000007
  ret = 1
  for _ in range(x):
    ret *= a
    ret %= MOD
  return ret
    
n=int(input())
MOD = 1000000007
ret = (bekijou(10,n)+MOD-((2*bekijou(9,n)) % MOD)+bekijou(8,n))%MOD
print(ret)
import sys


n = int(input())

pmax = 10 ** 9 + 7

if n == 1 or n== 0 :
    print('0')
    sys.exit()
    
elif n == 2:
    print('2')
    sys.exit()


x = 10 ** n % pmax
y = 9 ** n % pmax
z = 9 ** n % pmax
yz = 8 ** n % pmax

ans = (x - y - z + yz) % pmax


print(ans)
n = int(input())
powof10 = 1
powof9 = 1
powof8 = 1
MOD = 10**9+7
for _ in range(n):
    powof10 *= 10
    powof10 %= MOD
    powof9 *= 9
    powof9 %= MOD
    powof8 *= 8
    powof8 %= MOD
print((powof10-2*powof9+powof8) % MOD)
n = int(input())
MOD = 1000000007
 

ans = pow(10,n,MOD) - pow(9,n,MOD) - pow(9,n,MOD) + pow(8,n,MOD) 
print((ans+MOD)%MOD)
MOD = 10**9 + 7
n = int(input())
print((pow(10, n, MOD) - 2*pow(9, n, MOD) + pow(8,n,MOD))%MOD)
n = int(input())
mod = 10**9+7
a = 10**n-8**n
a%=mod
b = 10**n-9**n
b%=mod
c = b*2
d = c-a
d%=mod
print(d)
m = (10 ** 9) + 7
n = int(input())
ans = (10 ** n) + (8 ** n) - (2 * (9 ** n))
print(ans % m)
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)
def main():
    num = int(input())
    con = 10**9 + 7
    a, b, c = 1, 1, 2
    for i in range(num):
        a *= 10
        a %= con
        b *= 8
        b %= con
        c *= 9
        c %= con
    if(a+b-c < 0):
        print(a+b-c+con)
        return 0
    print(a+b-c)


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

mod = 10**9 + 7

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

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

x = 10 ** n
x -= 2 * (9 ** n)
x += 8 ** n

x = x % (10 ** 9 + 7)

print(x)
N = int(input())

Q = 10 ** 9 + 7

a10 = 1
a9 = 1
a8 = 1

for _ in range(N):
    a10 *= 10 
    a9 *= 9 
    a8 *= 8
      
    a10 %= Q
    a9 %= Q
    a8 %= Q

ans = (a10 - (2 * a9 - a8)) % Q

print(ans)
def binexp(a,b):
  res = 1
  while b>0:
    if b&1:
      res *= a
      res%=mod
    a *= a
    a%=mod
    b>>=1
  return res
mod = 1000000007
n = int(input())
if n==1:
  print(0)
elif n==2:
  print(2)
else:
  ans = binexp(10,n)
  ans1 = binexp(9,n)
  ans2 = binexp(8,n)
  print((ans-2*ans1+ans2)%mod)
N=int(input())

print((10**N+8**N-2*9**N)%(10**9+7))
N = int(input())
mod = 10**9+7
a = pow(10,N,mod)
b = pow(8,N,mod)
c = pow(9,N,mod)
ans = a-2*c+b
while ans<0:
    ans += mod
ans %= 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())
print((10**n-(9**n)*2+8**n)%(10**9+7))
import sys
readline = sys.stdin.buffer.readline
n = int(readline())
if n > 1 : print((pow(10,n) - 2*pow(9,n) + pow(8,n)) % 1000000007)
else : print(0)
n = int(input())
mod = 10**9 + 7

ans = pow(10,n, mod)
ans = ans - pow(9, n, mod) - pow(9, n, mod) + pow(8, n, mod)
ans %= mod
print(ans)
N = int(input())
INF = 10 ** 9 + 7
print((pow(10, N, INF) - 2 * pow(9, N, INF) + pow(8, N, INF)) % INF)
import math
from typing import List, Any


def read_int() -> int:
    return int(input().strip())


def read_ints() -> List[int]:
    return list(map(int, input().strip().split(' ')))

def modpow(base, p, modulo):
    answer = 1
    for _ in range(p):
        answer = (answer*base)%modulo
    return answer

def solve() -> Any:
    N = read_int()
    modulo = 10**9+7
    atleast = pow(10, N, modulo)-pow(9, N, modulo)
    answer = pow(8, N, modulo)+2*atleast-pow(10, N, modulo)
    return answer%modulo


if __name__ == '__main__':
    print(solve())
n=int(input())
if n==1:
    print(0)
else:
    ans=(10**n-2*9**n+8**n)%(10**9+7)
    print(ans)
n=int(input())
if n==1:exit(print(0))
m=10**9+7
total=pow(10,n,m)
total=(total-pow(9,n,m))%m # without zeros
total=(total-pow(9,n,m))%m # without ones
total=(total+pow(8,n,m))%m # without zeros and ones
print(total)
N=int(input())
X=10**N-2*9**N+8**N
print(X%(10**9+7))
import sys
sys.setrecursionlimit(250000)

# a = comb(n, r)

def main():
    # a,b,c,d = map(int, input().split())
    n = int(input())

    # temp = (10 ** 9 + 7)
    # sum = 0
    # if n >= 2:
    #     for i in range(2, n+1):
    #         a = int(comb(i, 2)) * 2
    #         a = (a * 8**(i-2)) % temp
    #         sum = sum + a
    # else:
    #     print(0)

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

main()
n = int(input())

def modpow(b,e):
    if e == 0:
        return 1
    elif e%2 == 1:
        return b*modpow(b,e-1)
    else:
        return modpow(b*b,e//2)

total = modpow(10,n)
minus = modpow(9,n)
add = modpow(8,n)

answer = total - minus - minus + add

answer %= 1000000007

print(answer)
N=int(input())
M=10**9+7
A=pow(9,N,M)
B=pow(9,N,M)
C=pow(8,N,M)
A-=C
B-=C
S=pow(10,N,M)
ans=S-C-(A+B)
print(ans%M)
n = int(input())
mod = int(1e9) + 7

a = 1
b = 1
c = 1

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

ans = (a - (2*c - b % mod)%mod + mod) % mod

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

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

print(ans%mod)
import sys
import math
#from queue import *
#import random
#sys.setrecursionlimit(int(1e6))
input = sys.stdin.readline
 
############ ---- USER DEFINED INPUT FUNCTIONS ---- ############
def inp():
    return(int(input()))
def inara():
    return(list(map(int,input().split())))
def insr():
    s = input()
    return(list(s[:len(s) - 1]))
def invr():
    return(map(int,input().split()))
################################################################
############ ---- THE ACTUAL CODE STARTS BELOW ---- ############

n=inp()
mod=int(1e9+7)

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

ans1 = 1
ans2 = 1
ans3 = 1
for _ in range(N):
    ans1 = (ans1*10)%MOD
    ans2 = (ans2*9)%MOD
    ans3 = (ans3*8)%MOD

ans = ((ans1 + ans3)%MOD - (ans2*2)%MOD)%MOD 
print(ans)
n = int(input())
lst = [8, 1, 1, 0]
for i in range(n - 1):
    a = lst[0]*8
    b = lst[0] + lst[1]*9
    c = lst[0] + lst[2]*9
    d = lst[3]*10 + lst[1] + lst[2]
    a = a%(10**9 + 7)
    b = b%(10**9 + 7)
    c = c%(10**9 + 7)
    d = d%(10**9 + 7)
    lst = [a, b, c, d]
print(lst[3])
N = int(input())
ans = 10 ** N - 2 * (9 ** N) + 8 ** N
print(ans % (10 ** 9 + 7))
MOD = 10**9+7
n = int(input())

ans = pow(10,n,MOD) - 2 * pow(9,n,MOD) + pow(8,n,MOD)
if ans<0:
    ans += MOD
if ans<0:
    ans += MOD
ans %= MOD
print(ans)
N = int(input())
ans=1
num=1
ans1=1
a=(10**9)+7
for i in range(N):
    ans*=10
    ans=ans%a
    num*=9
    num=num%a
    
for i in range(N):
    ans1*=8
    ans1=ans1%a


print((ans-2*num+ans1)%(10**9+7))
N = int(input())
MOD = 10 ** 9 + 7

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

print(ans)
def ri():
    return int(input())


def rii():
    return [int(v) for v in input().split()]


def solve():
    N = ri()
    m = int(1e9 + 7)
    ans = 10 ** N % m
    ans = (ans - 9 ** N) % m
    ans = (ans - 9 ** N) % m
    ans = (ans + 8 ** N) % m

    print(ans)


if __name__ == "__main__":
    solve()
mod = 1000000007

n = int(input())

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

mod = 10**9 + 7

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

print(ans%mod)
NUM = 1000000007

N = int(input())

all_colab = pow(10, N)
except_0or9_colab = pow(9, N)
except_0and9_colab = pow(8, N)

include_0and9_colab = all_colab - (2*except_0or9_colab - except_0and9_colab)

print(include_0and9_colab % NUM)
n=int(input())
a=10**n-2*(9**n)+8**n
print(a%((10**9)+7))
N = int(input())
MOD = 10**9+7
ans = 1
for i in range(N):
  ans*=10
  ans%=MOD
sub = 2
for i in range(N):
  sub*=9
  sub%=MOD
sub2 = 1
for i in range(N):
  sub2*=8
  sub2%=MOD
print((ans-(sub-sub2))%MOD)
n = int(input())

mod = 10 ** 9 + 7

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