peterverebics/CodeNet_Python_118 huggingface dataset:
N = int(input())
M = 10**9 + 7

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

ans = (pow(10, N, P) - pow(9, N, P))*2 - (pow(10, N, P) - pow(8, N, P))
print(ans%P)
def main():
    n = int(input())
    md = 10 ** 9 + 7
    ##0または9を使わない組み合わせ
    tmp1 = 9 ** n % md + 9 ** n % md - 8 ** n % md
    ans = 10 ** n - tmp1
    ans %= md
    print(ans)


if __name__ == '__main__':
    main()
N = int(input())
ans = 10 ** N - ((9 ** N) * 2 - 8 ** N)
print(ans % (10 ** 9 + 7))
n=int(input())
mod=10**9+7
def pw(k,t):
    return pow(k,t,mod)

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

ans = 10**9+7

allN = 10**N #全ての整数の列
left = 9 ** N #左端が0か9
right = 9 ** N #右端が0か9
ryoutan = 8 ** N #両端0か9

ncc =  allN - left - right + ryoutan
print(int(ncc%ans))
N = int(input())
mod_num =int(1.0e+9+7)

all_num = pow(10,N,mod=mod_num)
not09_num = pow(9,N,mod=mod_num)
both09_num = pow(8,N,mod=mod_num)
print((all_num-not09_num*2+both09_num)%mod_num)
n = int(input())
a = 10**9 +7
b = pow(10,n,a) + pow(8,n,a) - 2 * pow(9,n,a)
if b >= 0:
    print(b)
elif a+b >=0:
    print(a+b)
else:
    print(a+a+b)
import sys
INF = 1 << 60
MOD = 10**9 + 7 # 998244353
sys.setrecursionlimit(2147483647)
input = lambda:sys.stdin.readline().rstrip()
def resolve():
    n = int(input())
    ans = pow(10, n, MOD)
    ans -= 2 * pow(9, n, MOD)
    ans += pow(8, n, MOD)
    print(ans % MOD)
resolve()
n = int(input())
all = 10 ** n
o0q0 = 8 ** n
o0q1 = 9 ** n - o0q0
mod = 10 ** 9 + 7
a = (all - (o0q1 * 2) -o0q0) % mod
print(a)
import sys
input = sys.stdin.readline

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

mod = int(1e9) + 7
res = pow(10, N) % mod

res -= pow(9, N) % mod
res %= mod

res -= pow(9, N) % mod
res %= mod

res += pow(8, N) % mod
res %= mod

print(res)
N=int(input())
mod = 10**9+7
A=10**N%mod-2*9**N%mod+8**N%mod
print(A%mod)
# C
N = int(input())
nasi = 10**N - 9**N - 9**N + 8**N
wari = 10**9 + 7
ans = nasi % wari
print(ans)
n=int(input())
a=10**n-2*(9**n)+8**n
print(a%(10**9+7))
N = int(input())

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

print(ans % (10 ** 9 + 7))
MOD=1000000007
ans=0
N=int(input())
def modpow(a,x):
    ret=1
    while x>0:
        if x%2==1:
            ret*=a
            ret%=MOD
        a*=a
        x>>=1
    return ret

ans=modpow(10,N)+2*(MOD-modpow(9,N))+modpow(8,N)
print(ans%MOD)
N = int(input())
print((10**N-(8**N+2*(9**N-8**N)))%(10**9+7))
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt, factorial
from copy import deepcopy
 
def main():
    n = int(input()) 
    ans = (10**n) - 2*(9**n) + (8**n) 
    print(ans%(10**9+7))
    

if __name__ == "__main__":
    main()
import math
n = int(input())
if n == 1:
    print(0)
else:
    print(10**(n-2)*(math.factorial(n))%(10**9+7))
N = int(input())
print(pow(10,N,1000000007)-2*pow(9,N,1000000007)+pow(8,N,1000000007))
N = int(input())

mod = 10 ** 9 + 7

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

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

ex = a * 2 - b
if ex < 0:
  ex += mod
ans = w - ex
if ans < 0:
  ans += mod
print(ans)
n = int(input())
if(n == 1):
  print(0)
elif(n==2):
  print(2)
else:
  print((n*(n-1)+10**(n-2))%(10**9+7))
n = int(input())
ans = 0
ans += 8**(n-2) % (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-b*2+c)
n=int(input())
mod=10**9+7
ans=pow(n,10,mod)
ans-=2*pow(n,9,mod)
ans+=pow(n,8,mod)
print(ans%mod)
n = int(input())


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


print(modpow(10, n) - 2 * modpow(9, n) + modpow(8, n))
N = int(input())

if N < 2:
    print(0)
    exit()
N = N - 2

result = 2 * (10 ** N)
result = result % ((10 ** 9)+ 7)

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


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


ten = modpow(10, n)
nine = modpow(9, n)
eight = modpow(8, n)

ans = ten - nine - nine + eight


print(ans)
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
print(ans)
n = int(input())
MOD = 10**9+7
ans = pow(10, n, MOD) - pow(9, n, MOD) + pow(10, n, MOD) - pow(9, n, MOD) - (pow(10, n, MOD) - pow(8, n, 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))
N = int(input())

result = N * (N - 1)
result = result * (10 ** (N - 2))
result = result % (10 ** 9 + 7)

print(result)
N = int(input())
print(10**N - (9**N + 9**N- 8**N))
N = int(input())
mod = 10**9+7
print(pow(10, N, mod) - (pow(9, N, mod) * 2 - pow(8, N, mod)))
mod = 10**9+7
N = int(input())
if N == 1:
    print(0)
    exit()
plus = 1
minus = 1
cap = 1
for _ in range(N):
    plus *= 10
    minus *= 9
    cap *= 8
    plus %= mod
    minus %= mod
    cap %= mod
print(plus-2*minus+cap)
n = int(input())
if n == 1 or n == 2:
  print(n * (n-1))
else:
  print((10 * n * (n - 1) - (4 * n)) % (10 ** 9 + 7))
n = int(input())

if (n == 1)or(n==0):
    print(0)
else:
    xn = n-2
    a10 = 2*10**xn

    if n != 2:
        a9 = (9**(n-2)*(n-1)*2)
    else:
        a9 = 0

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

if N<2:
	print(0)
elif N==2:
	print(2)
else:
	without=10**(N-2)
	each=N*(N-1)
	final=without*each

	considered=final%(1000000007)

	print(int(considered))
n = int(input())

mod = 10 ** 9 + 7

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

if n == 1:
    print(0)
else:
    print(re)
n = int(input())

ans = 0

for i in range(n):
    if i == 0:
        ans = 1
    else:
        ans *= 2
n = int(input())
mod = 1000000007
print(pow(10, n, mod) - pow(9, n, mod) - pow(9, n, mod) + pow(8, n, mod))
# -*- using:utf-8 -*-

def factorial_cor(n):
  fact = 1
  for integer in range(1, n + 1):
    fact *= integer
  return fact

if __name__ == "__main__":
  MOD = 1000000007
  N = int(input())
  if N == 1:
    print(0)
  elif N == 2:
    print(2)  
  else:
    C = factorial_cor(N)
    ten = 10 ** (N - 2) * C
    ans = C % MOD
    print(int(ans))
from collections import defaultdict
from collections import deque
from collections import Counter
import math
import itertools

def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()

n = readInt()
if n==1:
	print(0)
	exit()
mod = 10**9+7
a = pow(10,n,mod)
b = pow(8,n,mod)
c = pow(9,n,mod)
print(a-2*c+b)
N=int(input())

if N<2:
	print(0)

else:
	without=10**(N-2)
	each=N*(N-1)
	final=without*each-each

	considered=final%(10**9+7)

	print(considered)
# -*- coding: utf-8 -*-
MOD=1000000007
x = int(input())
n1 = (10**x)%MOD
n2 = 2*9**x%MOD
n3 = 8**x%MOD
print(n1, n2, n3)
n = n1-n2+n3
print(int(n))
N=int(input())
mod=10**9+7

ans1=1
ans2=1
ans3=1
ans4=1
ans=0
for x in range(1,N):
    for y in range(1,N):
        ans1*=(N-(x-1))
        ans1%=mod
        ans2*=x
        ans2%=mod
        ans3*=(N-x-(y-1))
        ans3%=mod
        ans4*=y
        ans4%=mod
        ans5=8**(N-(x+y))
        ans5%=mod
        ans+=ans1*ans3*ans5/(ans2*ans4)
        ans%=mod
print(ans)
N = int(input())
mod = int(1e9) + 7
print(pow(10, N, mod) - pow(9, N, mod) - pow(9, N, mod) + pow(8, N, mod))
mod = (int)(1e9+7)
n = (int)(input())

print(pow(10, n, mod) - 2*pow(9, n, mod) + pow(8, n, 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))
N = int(input())

result = N * (N - 1) 
result = (result * (10 ** (N - 2))) % (10 ** 9 + 7)

print(result)
n = int(input())
MOD = 10**9 + 7
if n == 1:
    print(0)
elif n == 2:
    print(1)
else:
    ans = pow(10, n, MOD) + pow(8, n, MOD) - 2 * pow(9, n, MOD)
    print(ans % MOD)
from math import comb
if __name__=="__main__":
  n=int(input())
  if n==1:
    print(0)
    exit
  else:
    print(comb(n,2)*2)
mod = 10**9+7
n = int(input())

ans = int((n*(n-1)* 10**(n-2))) %  mod
print(ans)
N = int(input())
ans = (9**N - 2*8**N + 7**N)%(10**9+7)
print(ans)
import math
n = int(input())
if n < 2:
  print(0)
  exit()
combs = ((n+7)*(n+6)*(n+5)*(n+4)*(n+3)*(n+2)*(n+1)*(n)*(n-1))/(9*8*7*6*5*4*3*2)
combs *= (n-1)*n
print(int(combs % (10**9 + 7)))
N = int(input())
# (0.9)確定以外のAnの場合の数 * [(0.9), (9,0)]の２通り * [(0,9),(9,0)]の場合の数
ans = (10 ** (N - 2) * 2 * (N - 1)) % (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
print(pow(10,n,mod) - 2*pow(9,n,mod) + pow(8,n,mod))
N =int(input())
if ( N==1):
    print(0)
if(N>=2):
    a=N*(N-1)*(10**(N-2))
    print(a%(10^9+7))
n = int(input())
ans = 0
m = 10**9+7
ans = pow(10,n,m)
ans-=pow(9,n,m)*2
ans+=pow(8,n,m)
print(ans)
mod=10**9+7
def Ch(n,r):
  res=1
  for i in range (n,n-r,-1):
    res*=(i%mod)
    res%=mod
  return res

n=int(input())
ans=0
for zero in range(1,9):
  for nine in range(1,10-zero):
    ans+=((Ch(n,zero)*Ch(n-zero,nine))%mod)*(8**(n-zero-nine)%mod)
    ans%=mod
N = int(input())
s = N * (N-1)
p = 10 ** (N-2)
d = s * p
ans = d % (10 ** 9 + 7)
print(ans)
def fact(n):
    val = 1
    for i in range(2, n + 1):
        val += i
    return val
n = int(input())
if n ==1:
  print(0)
elif n == 2:
  print(2)
else:
  print((fact(n-1)*9**(n-2))%(10**9+7))
MOD = int(1e9 + 7)
n=int(input())
print(10 ** n % MOD - 9 ** n % MOD - 9 ** n % MOD + 8 ** n % MOD)
#!/usr/bin/env python3
import sys
input = sys.stdin.readline
MOD = 10**9 + 7

n = int(input())

ret = pow(10, n, MOD)
ret -= pow(9, n, MOD)
ret -= pow(9, n, MOD)
ret += pow(8, n, MOD)

print(ret)
n = int(input())

MOD = 10**9 + 7

allp = pow(10,n,MOD)
not09 = 2*pow(9,n,MOD)
closs = pow(8,n,MOD)

print(allp - not09 + closs)
N = int(input())

mod = 10**9+7
if N == 1:
  result = 0
else:
  result = (10**(N-2) * 2) % mod

print(result)
import random

N = int(input())
A = []
B = 0
while 0  not in A and 9 not in A:
    for i in range(0,N):
        A.append(random.randint(0,9))
for j in range(0,N):
    B += A[j]*10**j
x = B % 10**9 + 7
print(x)
import numpy as np

n = int(input())

#print ((n*(n-1)*10**(n-2)) % (1E9+7))

div=1000000007
mod1=n % div
mod2=(n-1) % div

loop=(n-2)//10
amari=(n-2)%10
mod3=1
for i in range(0,loop):
  mod3=(mod3*(10000000000 % div) ) % div
mod3=mod3*(10**amari % div)

print (loop, amari)
print((((mod1*mod2) % div)*mod3)%div)
x = input()
N = int(x)

if N == 1:
    print(0)
else:
    z = 10**N - 2*9**N + 8**N
    print(z)
n=int(input())
cnt=(10**n+8**n-2*(9**n))//(10**9+7)
def powmod(a,n,mod):
    ans = 1
    while n > 0:
        if n & 1:  # nの2進数表示の末尾が1か
            ans = ans * a % mod
        a = a ** 2 % mod  # aを2乗する
        n >>= 1  # nを2で割る
        #print(ans,a,n)
    return ans

#2分累乗法　ばらして余りとってかけ算
N=int(input())
m=powmod(10,N,1000000007)-powmod(9,N,1000000007)-powmod(9,N,1000000007)+powmod(8,N,1000000007)
print(m)
n = int(input())
num = 10**9 + 7
print((10**n)%num - (9**n)*2%num + (8**n)%num)
N = input()
x = int(N)
y = (x*(x-1)*(10**(x-2))) % (10**9+7)
print(y)
#!/usr/bin/env pypy3

MODULUS = 10**9+7

N = int(input())

ret = pow(10, N, MODULUS)
ret -= 2*pow(9, N, MODULUS)
ret += pow(8, N, MODULUS)

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

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

N = int(input())

A = 1
B = 1
C = 1

for _ in range(1,N+1):
  A *= 10
  A %= mod
  B *= 9
  B %= mod
  C *= 8
  C %= mod

ans = A - (2*B - C)

print(ans)
import sys
sys.setrecursionlimit(250000)

from scipy.special import comb
# 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()
def func(a, n):
    p = 10 ** 9 + 7
    bi = str(format(n, "b"))
    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())
n = func(10, N)
no_0 = func(9, N)
no_9 = func(9, N)
no_09 = func(8, N)
ans = (n - no_0 - no_9 + no_09)
if ans < 0:
    ans += 10 ** 9 + 7
print(ans)
n = int(input())
ans = int(((10 ** (n - 2)) * ((n - 1) * n)) % ((10 ** 9)+ 7))
print(ans)
n = int(input())
if n == 1:
    print(0)
elif n == 2:
    print(2)
else :
    x = n - 2
    combi = (n*(n-1))
    ans = ((10 ** x)%(10**9+7) * combi - combi)%(10**9+7)
    print(ans)
import math
from scipy.special import comb
mod = 1000000007
N = int(input())

def Solve(N, n, r):
  ans = comb(N, 2, exact=True)*2
  for i in range(r):
    ans = ans * (n - i) % mod
  return ans
  
print(Solve(N,10*(N-2),N-2))
#coding:utf-8

N = int(input())

ron = 10 ** 9 + 7

a = (10 ** N) % ron

b = (9 ** N) % ron

c = (9 ** N) % ron 

bandc = (8 ** N) % ron

ans = a - b - c + bandc

print("{}".format(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)
def pow_r(x, n):
    """
    O(log n)
    """
    if n == 0:  # exit case
        return 1
    if n % 2 == 0:  # standard case ① n is even
        return pow_r(x ** 2, n // 2)
    else:  # standard case ② n is odd
        return x * pow_r(x ** 2, (n - 1) // 2)
total = 0
num = int(input())
for i in range(1, num):
    total += pow_r(2, i)

print(total)
N = int(input())
INF = 10 ** 9 + 7
if N < 2:
    print(0)
    exit()
print(pow(10, N, INF) - 2 * pow(9, N, INF) + pow(8, N, INF))
from functools import reduce

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


def powmod(val, n, mod):
    vals = [val]*n
    ret = reduce(lambda x, y : x * y % mod, vals)

    return ret

    # for i in range(n):
    #     ret = ret * val % mod

    return ret


all = powmod(10, N, mod)
b = powmod(9, N, mod)
c = powmod(8, N, mod)
n=int(input())
print((n*(n-1)*10**(n-2))%1000000007)
n=int(input())
print((10**n-9**n*2+8**n)%10**9+7)
MOD = 10**9+7
n = int(input())
print(pow(10, n, MOD)-2*pow(9, n, MOD)+pow(8, n, MOD))
N=int(input())
MOD=10**9+7
MAX=N+1
def powermod(base,p):
  powls=[0 for i in range(MAX)]
  powls[0]=1
  if powls[p]!=0:
    return powls[p]
  elif p%2==0:
    return (powermod(base,p//2)**2)%MOD
  else:
    return (powermod(base,p-1)*base)%MOD

print(powermod(10,N)-2*powermod(9,N)+powermod(8,N))
N=int(input())
MOD=10**9+7
MAX=N+1
def powermod(base,ind):
  if ind==1:
    return base
  elif ind%2==0:
    return (powermod(base,ind//2)**2)%MOD
  else:
    return ((powermod(base,ind//2)**2)*base)%MOD

print(powermod(10,N)-2*powermod(9,N)+powermod(8,N))
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    n = int(input())
    mod = 10**9+7
    print(pow(10,n,mod)-2*pow(9,n,mod)+pow(8,n,mod))

if __name__=='__main__':
    main()
N = int(input())
ans = (N*(N-1))*(10**(N-2))
ans = ans % (10**9+7)
print(int(ans))
import math
n = int(input())
summ = 0
mod = 10 ** 9 + 7
sigma = 0

def comb_count(n, r, a):
    return math.factorial(n) // \
    (math.factorial(n - r) * math.factorial(a) * math.factorial(r - a))


for i in range(2, n + 1):
    for t in range(1, i):
        z = comb_count(n, i, t)
        sigma += z

    summ = summ + (sigma * 8 ** (n - i))
    summ = summ % mod

print(summ)
N = int(input())

print(10**N-2*9**N+8**N)
if __name__ == "__main__":

    N=int(input())

    a = N * (N-1) * 10 ** (N-2)
    a = a  % (10 ** 9 + 7)

    print(a)
M = 10**9 + 7


def main():
    n = int(input())
    a = 1
    b = 1
    c = 1
    for i in range(n):
        a *= 10
        a %= M
        b *= 9
        b %= M
        c *= 8
        c %= M
    print(a - b - b + c)


if __name__ == '__main__':
    main()
"""AtCoder Beginner Contest 178.

C
"""

import sys


def input() -> str:  # noqa: A001
    """Input."""
    return sys.stdin.readline()[:-1]


def main():
    """Run."""
    mod = 1000000007
    n = int(input())

    ans = 0

    if n <= 1:
        ans = 0
    elif n == 2:
        ans = 2
    else:
        ans = 10**n
        ans -= 8**n
        ans -= 8**n
        ans += 7**n

    print(ans % mod)


main()
m=10**9+7
n=int(input())
a=(8**n)%m
b=(9**n)%m
c=(10**n)%m
print((2*b-c+a)%m)
n = int(input())
mod = 10**9+7
a = pow(10,n,mod)
a -= pow(9,n,mod)*2
a += pow(8,n,mod)
print(a)
import math
n=int(input())
y=pow(10,n)-100*(pow(9,n-1))
y=y%(pow(10,9)+7)
print(y)
n=int(input(''))
A=10**9+7
if n==1:
    print(0)
elif n==2:
    print(2)
elif n>=3:
    e=1
    for i in range(n):
        e=e*10
        if e>=A:
            e=e%A
    
    d=1
    for i in range(n):
        d=d*8
        if e>=A:
            e=e%A

    r=e-d
    if r<A:
        r=r+A

    print((r)%(10**9+7))
import sys
input = sys.stdin.readline

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


    
if __name__ == "__main__":
    main()
n=int(input())
x=(10**n)%(10**9+7)
y=(9**n)%(10**9+7)
z=(8**n)%(10**9+7)
print(z-2*y+x)
N = int(input())
print((10**N - 9 ** N - 9**N + 8**N) % (10**9 - 7))
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))
n = int(input())
cur = 8
bot = n
t = 0
for i in range(1, n):
    t += cur*(bot//i)
    cur *= 8
    bot *= n-i

print((10**n - 2*t - 8**n)%(10**9+7))
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)
import math
n = int(input())
ans = 20**(n-2) % (10**9 + 7)
print(math.floor(ans))
import sys
#sys.exit()
#sorted( ,reverse=True)
N = int(input())
if N ==1:
    print(0)
    sys.exit()
#S,T = map(int, input().split())
#A = list(map(int, input().split()))
#A = [int(input()) for _ in range(N)]
c = 10**9+7
total = 10**N 
#0と9のみ
a= 8**N
#0のみ、9のみ
b= 1
d = N
for i in range (N-1):
    d = d*8
    b += d
ans = total - a - b*2

ans2 = ans % c 

#cnt = 0
#cnt += 1

print(ans2)

#print(N)
#print(S,T)
#print(A)
#print('Yes')
#print('No')
#print(cnt)
N = int(input())

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

M = 10**9+7
print(pow(10, N, M)-pow(9, N, M)*2+pow(8, N, M))
n = int(input())
print((8 * n * (n - 1)) % (10 ** 9 + 7))
N = int(input())
MOD = 10 ** 9 + 7
if N == 1:
  print(0)
  exit()
a = 1
b = 1
c = 1
for i in range(N):
  a = a * 10 % MOD
  b = b * 9 % MOD
  c = c * 8 % MOD
ans = a - 2 * b + c
print(ans)
N = int(input())
print(pow(10, N, mod=1000000007) - pow(9, N, mod=1000000007) - pow(9, N, mod=1000000007) + pow(8, N, mod=1000000007))
n = int(input())
mod = 10**9+7

def pow(n, num):
  s = num
  for i in range(1,num):
    s = s*n%mod
  return s
print((pow(n,10) - 2*pow(n,9) + pow(n,8))%mod)
import sys

MOD = 10 ** 9 + 7


def main():
    input = sys.stdin.buffer.readline
    n = int(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
print(pow(10, N, mod) - ((pow(9, N, mod) * 2 % mod) - pow(8, N, mod)))
N = int(input())
p = 10**9+7
ans = pow(10,N,p) + pow(8,N,p)-2*pow(9,N,p)
print(ans)
# -*- coding: utf-8 -*-
MOD=1000000007
x = int(input())
n1 = (10**x)%MOD
n2 = 2*9**x%MOD
n3 = 8**x%MOD
n = n1-n2+n3
print(int(n))
n=int(input())

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

for i in range(1, N):
  W, V = 10 * W + V, 7 * V + 2 * 10 ** i
print(W)
n = int(input())
mod = 1000000007

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

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

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

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

mod = 1000000007

print((10**N)%mod - (2*(9**N))%mod + (8**N)%mod)
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
if ans < 0:
    print(ans+mod)
else:
    print(ans)
n=int(input())
a=(10**n-8**n)//(10**9+7)
print(a)
N = int(input())

print(-2*pow(9, N, 1000000007)+pow(8, N, 1000000007)+pow(10, N, 1000000007))
N = input()
x = int(N)
a = x-1
b = 10**(x-2)
y = x*a*b
z = y % (10^9+7)
print(z)
N = int(input())
ans = (10**N % (10**9+7)) - (2 * 9**N % (10**9+7)) + (8**N % (10**9+7))
print(ans)
n = int(input())
print((10**n - 9**n - 9**n ) + 8**n)
n = int(input())
print(10**n-2*(9**n)-8**n)
N = int(input())
Mod = 10**9+7
print(pow(10,N,Mod)-2*pow(9,N,Mod)+pow(8,N,Mod))
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)
n = int(input())
if n <= 1:
    print(0)
    exit()
print((2**n - 2) % (10**9 + 7))
N = int(input())

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

print(ans)
N=int(input())
Ans=10**N%(10**9+7)-2*(9**N%(10**9+7))+8**N%(10**9+7)
print(Ans)
N = int(input())
base = 10**(N-2)
res = base*N*(N-1)
mod = int(res % (10**9 + 7))
print(mod)
N = int(input())
print(10**N-(9**N+9**N-8**N))
def main():
    import sys
    def input():
        return sys.stdin.readline()[:-1]
    N=int(input())
    mod=1000000007

    def aaa(a,b,p):
        if b==0:
            return 1
        elif b%2==0:
            d=aaa(a,b/2,p)
            return (d*d)%p
        else:
            return (a*aaa(a,b-1,p))%p
    print(aaa(10,N,mod)-2*aaa(9,N,mod)+aaa(8,N,mod))

   




if __name__ == '__main__':
    main()
N = int(input())
print('{}'.format((2**N-2)%(10**9+7)))
import math
n = int(input())
a = pow(10, n, 10**9+7)
b = pow(9, n, 10**9+7)
c = pow(9, n, 10**9+7)
d = pow(8, n, 10**9+7)
print((a-b-c+d) % 10**9+7)
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)
n = int(input())
mod = 10**9+7
a = pow(10, n, mod)
b = pow(9, n, mod)
c = pow(8,n,mod)
ans = a-2*b+c
print(ans)
N = int(input())

n10 = 1
n8 = 1
n9 = 1
beki = N
while beki>4:
    n10 = (n10*(10**5))%(10**9+7)
    beki -= 5  
n10 = (n10*(10**beki))%(10**9+7)
beki = N
while beki>4:
    n8 = (n8*(8**5))%(10**9+7)
    beki -= 5  
n8 = (n8*(8**beki))%(10**9+7)
beki = N
while beki>4:
    n9 = (n9*(9**5))%(10**9+7)
    beki -= 5  
n9 = (n9*(9**beki))%(10**9+7)

print(n10-2*n9+n8)
N = int(input())
ans = 0
if N == 1:
    ans = 0
elif N>=2:
    ans = 2**N - 2
print(ans%(10**9+7))
N = int(input())
mod = 10**9 + 7


def powmod(val, n, mod):
    ret = 1
    for i in range(n):
        ret = ret * val % mod

    return ret


all = powmod(10, N, mod)
b = powmod(9, N, mod)
c = powmod(8, N, mod)

ans = all - (2*b - c)
ans = powmod(10, N, mod) - (powmod(9, N, mod) + powmod(9, N, mod) - powmod(8, N, mod))

print(ans)
n=int(input())
#ans=(n*(n-1))//2*pow(8,n-2)
#ans=(pow(10,n)-pow(8,n))%1000000007
ans=(10**n-8**n)%1000000007
print(ans%1000000007)
n=int(input())
ans=0
mod=10**9+7
if n>=2:
    ans+=pow(10,n,mod)
    ans-=pow(9,n,mod)
    ans-=pow(9,n,mod)
    ans+=pow(8,n,mod)
print(ans)
n = int(input())

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

ans = w - (a * 2 - b)
if ans < 0:
  ans += mod
print(ans)
N = int(input())
out = (10**N % (10**9+7) - 2*9**N % (10**9+7) + 8**N % (10**9+7))
print(out)
n = int(input())
print(10 ^ n + 8 ^ n - 9 ^ n -9 ^ n)