peterverebics/CodeNet_Python_118 huggingface dataset:
import sys
N= int(input())
if N==1:
    print(0)
    sys.exit()
if N>=2:
    a=10
    b=9
    c=8
    for i in range(N-1):
        a=a*10%(10**9+7)
        b=b*9%(10**9+7)
        c=c*8%(10**9+7)
print(a-2*b+c)
n = int(raw_input())
mod = (10 ** 9 )+ 7

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

print (f(9,n) + f(9,n) - f(8,n)) %mod
#import math
import itertools
n = int(input())
l = list(range(0, n, 1))
#print(l)
def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)
#print(len(list(itertools.permutations(l, 2))))
#%(10^9 + 7)した答えを出力
mas = n-2 # 0と9は必ず使う
if mas == 0:
  print(2)
elif n == 0:
  print(1)
else:
  #res = (permutations_count(n, 2) * 10^mas)%(10^9 + 7)
  res = (len(list(itertools.permutations(l, 2)))%(10^9 + 7)) * (10^mas%(10^9 + 7))
  print(res)
def fact(n):
  ans = 1
  for i in range(1, n+1):
    ans *= i
  return ans

def comb(a, b):
  if a < b:
    a, b = b, a
  return fact(a)/(fact(a-b)*fact(b))

x = int(input())

a = comb(x, 2)
b = 10*(x-2)
print(a*b)
n = int(input())
m = 10**9 + 7
if n==1:
  print(0)
  exit()
s = 0
a = (8**(n-2))*10
a2 = (a//10)*8
sa = (4*a*5**(n-1))//(4**(n-1))-4*a
sb = a2*(n-1)
print((sa-sb)%m)
n=int(input())
modd=1000000007
if(n==1):
    ans=1
elif n==2:
    ans=2
else:
    ans=(pow(10,n,modd)-pow(9,n,modd)*2+pow(8,n,modd))%modd
print(ans)
n=int(input())

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

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

print(ans)
import math

N = int(input())

def permutations_count(n, r):
    return math.factorial(n) //( math.factorial(n - r) * math.factorial(r))

ans = 0
if N == 1:
    ans = 0
elif N == 2:
    ans = 2
else:
    for r in range(1,N,1):
        ans += permutations_count(N, r) % (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)
N=int(input())

if N<2:
	print(0)

else:
	without=10*(N-2)
	considered=(without+2)*(without+1)
	print(considered)
n = int(input())
if n ==1:
  print(0)
elif n == 2:
  print(2)
else:
  print(1+(n-1)**2*((10-n+2)*(10**(n-3)))%(10**9+7))
n = int(input())
print(10**n - (9**n * 2 - 8**n))
n = int(input())
MOD = 1000000007
a,b,c,d=pow(9,n,MOD),pow(9,n,MOD),pow(8,n,MOD),pow(10,n,MOD)
print(d-a-b+c)
N = int(input())

d_num = (10 ** 9) + 7

from operator import mul
from functools import reduce

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

if N == 1:
    print(0)
elif N == 2:
    print(2)
else:
    x = N - 2
    y = 9 + x
    ans = cmb(y, x)
    
    ans = ans % d_num
    print(ans)
MOD = 10**9 + 7
N = int(input())
print(pow(10, N, MOD) + pow(8, N, MOD) - 2*pow(9, N, MOD))
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())
S=10**9+7
if N==1:
    z=0
elif N==2:
    z=2
else:
    z=((10**(N-2) *N*2) - (10**(N-3) * (N*2-1))) %S
print(z)
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)
import math

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))



n = int(input())

if n == 1:
    print(0)
    exit()
else:
    k = combinations_count(n,2)

k = k * 10**(n - 2)

print( k % (10**9+7) )
N = int(input())
mod = 10**9+7
print(10**N%mod-(2*(9**N%mod)-8**N%mod))
n = int(input())
print(10 ^ n + 8 ^ n - 9 ^ n -9 ^ n%(10**9+7))
# 21:17-                                                                                                                                                      
N = int(input())

kMod = 10**9+7

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

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

x = p(10, n) - 2*p(9, n) + p(8, n)
if x < 0:
    x += 10 ** 9 + 7
elif x == 10 ** 9 + 7:
    x = 0
print(x)
N = int(input())
MOD = 10**9 + 7
val1 = 9**N
val2 = 9**N
val3 = 8**N
ans = 10**N - val1 - val2 + val3
print(ans)
from math import factorial
mod = 10**9+7

n = int(input())

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

def pow(x, n):
    ans = 1
    n_tmp = n
    while n:
        if n % 2:
            ans *= x
            ans %= mod
        x *= x
        n >>= 1
    return ans


mod = 10**9+7 #出力の制限

a = pow(8, n) # 0,9を含まない
b = pow(9, n) # 0 or 9 のどちらかを含む
c = pow(10, n) # 全て
print(c-2*b+a)
y=(2**3)-2
x=y*9**(y-2)%(10**9+7)
if x<10**10:print(x)
else:print('ERROR')
N = int(input())

d = 1000000007
result = (10 ** N) % d
result -= (9 ** N) % d
result = result % d
result *= 2
result = result % d
result -= (10 ** N) % d
result += (8 ** N) % d

result = result if result > 0 else d + result
print(result)
NUM = 1000000007

N = int(input())

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

print(all_colab - (2*except_0or9_colab - except_0and9_colab))
n = int(input())
mod = (10**9)+7
ans = (10**n)%mod - (2*(9**n)-8**n)%mod
print(ans)
n = int(input())
MOD = (10**9) + 7

print(((2**n) - 2) % MOD)
n = int(input())
p = 10**9+7
print(pow(10, n, p) - 2*pow(9, n, p) + pow(8, n, p))
# -*- coding: utf-8 -*-
from sys import stdin
input = stdin.readline

def main():
    p = 10**9+7
    n = int(input().strip())
    if 1 < n:
        print((n-1)*n)
    else:
        print(0)
    

if __name__ == "__main__":
    main()
n=(int)(input())
if n<2:
  print(0)
else:
  ans=(9**n)-2*(8**n)+(7**n)
  print(ans%(10**9+7))
def main():
    N = int(input())
    mod = 10 ** 9 + 7
    mod_1 = 1
    mod_2 = 1
    mod_3 = 1
    for _ in range(N):
        mod_1 = (mod_1 * 10) % mod
        mod_2 = (mod_2 * 9) % mod
        mod_3 = (mod_3 * 8) % mod
    print(mod_1 - 2 * mod_2 + mod_3)

if __name__ == '__main__':
    main()
n = int(input())
mod = 10**9+7
ans = int(((n*(n-1))*(10**(n-2))) % mod)
print(ans)
n = 869121
a = 10 ** n - 2 * 9 ** n + 8 ** n
print(a % (10 ** 9 + 7))
n = int(input())

x = 0
i = 0

k = n-2

l = [(i+1)*((9**i) * 10**(k-i)) for i in range(k+1)]
"""
while(k>=i):
  x += (i+1)*((9**i) * 10**(k-i))
  i += 1

x *= 2
"""
x = sum(l)
x *= 2
print(x%(10**9 + 7))
n=int(input())
m=10**9+7
print((10**n)%m-(9**n)%m-(9**n)%m+(8**n)%m)
n = int(input())

mod = (10**9)+7

if n == 1:
    print(0)
elif n==2:
    print(2)
else:
    t = n-2
    gyou = (8**t)
    xsisu = (10**t)
    nankotasuka = t*2
    itigyo = (gyou + xsisu*nankotasuka)%mod
    tmp = n-1
    ans = (tmp*itigyo)%mod
    ans = (ans*n)%mod
    print(ans)
n = int(input())
print((10 ** (n-2) * n * (n - 1) - 4 * n ) % (10 ** 9 + 7))
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())

print(N*(N-1)%1000000007)
n = int(input())

if n ==0:
    print(0)
    exit()
    
print(10**n+8**n-9**n-9**n)
N = int(input())

if N == 1:
    print(0)
else:
    a = (10**N) % (10**9+7)
    b = (2*(9**N)) % (10**9+7)
    c = (8**N) % (10**9+7)
    print(a-b+c)
import math
A=int(input())
ANS=0

for i in range(1,A):
    ANS=ANS+(math.factorial(A)/((math.factorial(A-i))*(math.factorial(i))))

ANS=ANS+pow(8,A-2)*math.factorial(A)
if A==2:
    print(2)
elif ANS>1000000007:
    print(int(ANS%1000000007))
else:
    print(int(ANS))
n = int(input())
rest = n - 2
MOD = 10 ** 9 + 7
# tmp = 10 ** rest
tmp = 1
for _ in range(rest):
    tmp *= 10
    tmp %= MOD
ans = n * (n-1)  % MOD * tmp % MOD
ans %= MOD
print(int(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())
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)))
import math
N = int(input())
print(10**N - 2 * 9**N + 8**N)
MOD = 10**9 + 7
n = int(input())

def pow(x, n):
    res = 1
    while n > 0:
        if n & 1:
            res = res * x % MOD
        
        x = x**2 % MOD
        n >>= 1
    return res

print(pow(10,n) - pow(9,n)*2 + pow(8,n))
n = int(input(''))-1

mod = 1000000007

cnt= (10**n - 8**n)%mod
#print("{} - {} = {}".format(10**n,8**n,cnt))
print(cnt)
N = int(input())
a = 10**9 + 7
tmp1 = 10**N %a
tmp2 = 2*9**N  %a
tmp3 = 8**N  %a

answer = tmp1-tmp2+tmp3 %a

print(answer)
a = int(input())
mod = 10**9 +7
if a > 1:
  num =2**a-2
  cum = num % mod
  print(cum)
  exit()
print(0)
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((((mod1*mod2) % div)*mod3)%div)
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())

def haha(n):
    a = 0
    for i in range(n-1):
        a += (9**(n-2-i))*(10**(i))
    return a*8+10**(n-1)

ans = 0
for i in range(1,N):
    ans += haha(i)
print((ans*2)%(10**9+7))
N=int(input())

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

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

cnt = n * (n - 1) % MOD

for i in range(n - 2):
    cnt *= 9
    cnt %= MOD
n = int(input())
MOD = (10**9) + 7

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


if __name__ == "__main__":
    main()
n = int(input())
mod = 10**9 + 7
ans = 10**n % mod
ans -= (2 * 9**n) % mod
ans += (8**n) % mod

print(ans)
n = int(input())
MOD = 10**9 + 7
print(pow(10, n, MOD) - 2 * pow(9, n, MOD) + pow(8, n, MOD))
inp = int(input())
comb = inp*(inp-1)
bekiz = comb
Answer = 1
if inp <= 1:
    print(0)
elif inp == 2:
    print(2)
else:
    for i in range(inp-2):
        bekiz = bekiz*10%1000000007
    
    Answer = bekiz

    print(Answer)
n = int(input())
if n == 1:
    print(0)
else:
    t = 10**9 + 7

    a = (10**n)%t
    b = (8**n)%t

    c = (9**n)%t
    d = 2*(c - b)

    print(a-b-d)
n=int(input())
a=(10**n+8**n-2*(9**n))//1000000007
print(a)
n =int(input())
Sum=(10**n)-(9**n)-(9**n)+(8**n)
print(Sum)
import sys

input=sys.stdin.buffer.readline


#sys.setrecursionlimit(10**9)
#from functools import lru_cache

def RD(): return sys.stdin.read()


def II(): return int(input())


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


def MF(): return map(float,input().split())


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


def LF(): return list(map(float,input().split()))


def TI(): return tuple(map(int,input().split()))


# rstrip().decode('utf-8')


def main():
	n=II()
	a=pow(10,n,10**9+7)
	b=pow(9,n,10**9+7)
	c=pow(8,n,10**9+7)
	print(a-2*b+c)
	

if __name__=="__main__":
	main()
n=int(input())
print(10**n-2*(9**n)+8**n)
from operator import mul
from functools import reduce

N = int(input())

MOD = 10**9+7
if N == 1:
    print(0)


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, N, MOD)
b = power_func(8, N, MOD)
c = power_func(9, N, MOD)
print((a+b+(-2)*c)%MOD)
n = int(input())
num = 10**9 + 7
print(10**n % num - (9**n%num)*2 + 8**n%num)
MOD = 1000000007
def modpow(a, n, mod) :
    ret = 1
    while n > 0:
        if n % 2 == 1:
            ret = ret * a % mod        
        a = a * a % mod
        n = n // 2
    return ret

N = int(input())
print(modpow(2,10,1000))
if N < 2:
  print(0)
elif N == 3:
  print(2)
else:
  ret1 = modpow(10,N,MOD) 
  ret2 = modpow(8,N,MOD)
  ret3 = modpow(9,N,MOD)
  ret = (ret1 - ret3 - ret3 + ret2) % MOD
  print(ret)
n=int(input()) 
ans = 0

if n==1:
    print(0)
else:
    ans = 10**n-9**n-9**n+8**n
    ans %= 10**9+7

print(ans)
N = int(input())
print((pow(10,N,int(10e9)+7) - 2*pow(9,N,10**9+7) +pow(8, N, 1_000_000_007)) % (pow(10,9) +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

N = int(input())

a1 = power_func(10,N,10**9+7)
a2 = power_func(9,N,10**9+7)
a3 = power_func(8,N,10**9+7)
print(a1 - 2 * a2 + a3)
#10**N - 2 * 9 ** N + 8 **N
n = int(input())

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

print(p(10, n) - 2*p(9, n) + p(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())

ten=1
nine=1
eight=1

mod=10**9+7

for i in range(N):
    ten *=10
    ten %=mod
    nine *=9
    nine %=mod
    eight *=8
    eight %=mod
print(ten-2*nine+eight)
from math import factorial

N = int(input())

def combination_count(n,r):
    return factorial(n) // (factorial(n-r) * factorial(r))

def mod_calc(x):
    if x == 1:
        return 0
    elif x == 2:
        return 2
    else:
        return int((combination_count(x,2)*(x-2)*10*2) % (10e9 + 7))

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

MOD = 10 ** 9 + 7

print( ((n * (n - 1)) * (10 ** (n - 2)) if n > 1 else 0 ) % MOD )
N = int(input())


def ruizyou(x, n, S=1):
    
    S = 1
    for _ in range(n):
        S = (S*x)%(1e9+7)
    
    return S
    
a = int( ruizyou(10, N) + ruizyou(8, N) - ruizyou(9, N)*2 )

print(a)
def mypow(x,k,p):
    out = 1
    while(k > 0):
        if(k%2 == 1):
            out = out * x % p
        k = k // 2
        x *= x
    return out

p = 10 ** 9 + 7
n = int(input())
res = mypow(10,n,p) - mypow(9,n,p)*2 + mypow(8,n,p)
print(res)
import math
n = int(input())
ans = (2 * 10**(n-2)) % (10**9 + 7)
print(math.floor(ans))
N = int(input())
a = 10**N - 8**N - 2*9**N
b = a % (10**9  + 7)
print(b)
n=int(input())
a=1000000007
ans=10**n%a-9**n%a-9**n%a+8**n%a
print(ans)
N = int(input())
comb = 10**N-2*(9**N-8**N)
print(comb%(10**9+7))
N = int(input())
mod = 10**9+7
print(10**N%mod-(2*9**N%mod-8**N%mod))
N = int(input())
MOD = 7+10**9
ans = (10**N) % MOD
ans = (ans + (8**N)) % MOD
ans = (ans - (2*(9**N))%MOD)
print(ans)
def main():
    n = int(input())
    if n == 1:
        print(0)
        return 0

    com = n*(n-1)
    print(com*(10**(n-2)) % (int(1e9)+7))
    
    
    
if __name__ == '__main__':
    main()
M = 10**9+7
N = int(input())
print(pow(10,N,M)-pow(9,N,M)-pow(9,N,M)+pow(8,N,M))
import math

mod=10**9+7

N=int(input())

if(N==1):
    print(0)
else:
    a=10**N-9**N*2+8**N
    if(a>mod):
        b=a//mod
        print(b)
    else:
        print(a)
N = int(input())
mod = 10**9+7

ans = pow(10, N, mod) - 2*pow(9, N, mod) + pow(8, N, mod)
print(ans)
import sys
import itertools
# import numpy as np
import time
import math
from heapq import heappop, heappush
from collections import defaultdict
from collections import Counter
from collections import deque
from itertools import permutations
sys.setrecursionlimit(10 ** 7)
 
INF = 10 ** 18
MOD = 10 ** 9 + 7
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

# map(int, input().split())
N = int(input())
ans = (10 ** N) % MOD - (9 ** N) * 2 % MOD + (8 ** N) % MOD
print(ans)
import sys
import math
input = sys.stdin.readline

n = int(input())
if n == 1:
    print(0)
else:
    print(((n**2)-2)%10000000007)
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

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)
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())
MAX = 10 ** 9 + 7
print(power_func(2, N, MAX) - 2)
n=int(input())
m=(10**9)+7
a=(n*(n-1))
b=pow(10,n-2)
print((a*b)%m)
M = 10**9+7
def p(n, r):
    x = 1
    for i in range(r):
        x *= n - i
        x %= M
    return x

N = int(input())

tmp = p(N,2)

tmp2 = (10**(N-2)) %M
#print(tmp)
tmp3 = (2**(N-2)) %M

if N==1:
    print(0)
elif N==2:
    print(2)
else:
    a = tmp*tmp2
    b = tmp*tmp3//2
    print((a%M-b%M)%M)
mod=10**9
n=int(input())
print((pow(10,n,mod)-(2*pow(9,n,mod)-pow(8,n,mod)))%mod)
# 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)
n = int(input())

mod = 10 ** 9 + 7

print((10 ** n) - (2 * (9 ** n)) + (8 ** n) % mod)
import sys

def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

mod = 1000000007
N = I()
if N == 2:
    print(2)
elif N == 1:
    print(0)
else:
    comb = ((N *(N-1)))
    
    ans = comb * 10 ** (N - 2) % mod
    
    print(int(ans))
N = input()
x = int(N)
y = x*(x-1)*(10**(x-2))
z = y % (10^9+7)
print(z)
inf = pow(10,9)+ 7

n=int(input())
if n==1:
  print(0)
elif n==2:
  print(1)
else:
  f=pow(10,n,inf) - 2*pow(9,n,inf) + pow(8,n,inf)
  print(f%inf)
N = int(input())
a=10**N -2*(9**N) + 8**N
print(a)
S=lambda:input()
I=lambda:int(input())
L=lambda:list(map(int,input().split()))
LS=lambda:list(map(str,input().split()))

n=I()
mod=10**9+7
nP2=n*(n-1)
eights=pow(8,n-2,mod)
ans=(nP2*eights)%mod
print(ans)
n = int(input())
ans = ((2 << n - 1) - 2) % 1000000007
print(ans)
MOD = 10**9 + 7
n = int(input())
ans = pow(10, n, MOD) - pow(9, n, MOD) * 2 + pow(8, n, MOD)
print(ans)
n = int(input())

ans1 = 10 ** (n-2)
ans2 = n * (n-1)
mod = 10**9 + 7
final_answer = int(ans1 * ans2 % mod)

print(final_answer)
N = int(input())
d = 10**9 + 7
print(pow(10, N, d) - pow(9, N, d)*2 + pow(8, N, d))
def pf(a,n,p):
    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())
mod=10**9+7

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

print(ans)
from math import comb
t = int(input())
mod = 10**9 + 7
ans = 0

for i in range(1, t):
    ans = (ans + comb(t,i)%mod)%mod
print(ans)
n = int(input())
if n == 1:
  ans = 0
else:
  ans = ((10 ** (n - 1) + (10 ** (n - 2) * 9)) * 2 - (10 ** n - 8 ** 2)) % (10 ** 9 + 7)
print(ans)
N = int(input())

mod = 10 ** 9 + 7
nn = (10 ** N) % mod
nm = 2 * (9 ** N) % mod - (8 ** N) % mod

print(nn - nm)
N = int(input())
a = 10**9 + 7
tmp1 = 10**N %a
tmp2 = 2*9**N %a
tmp3 = 8**N %a

answer = tmp1-tmp2+tmp3

print(answer)
n = int(input())

if (n == 1)or(n==0):
    print(0)
else:
    if n==2:
        print(2)
    else:
        ans = (10**(n-3))*54
        print(ans)
N = input()
N = int(N)

if N == 0 or N == 1:
  print(0)
else:
  print(((10 ** (N-2)) * (N * (N-1)))  % (10**9+7))
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())
mod=10**9+7
print(pow(10,N,mod)-pow(9,N,mod)*2+pow(8,N,mod))
N=869121

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)
import numpy as np

N = int(input())
MOD = 1000000007
if N==1 or N==0:
    ans=0

elif N==2:
    ans =2

else:
    ans = (  ( N*(N-1) ) %MOD  ) * (  (  10**(N-2) - (N-2)*(N-3)   )%MOD)
    ans = ans % MOD

print(ans)
from operator import mul
from functools import reduce      

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

def main():

    N = int(input())

    if N == 1:
        print(0)
        return

    ans = cmb(N, 2) * 2 * (10 ** (N-2))
    ans = ans % (10 ** 9 + 7)
    #print(10 ** 9 + 7)
    #print(cmb(N, 2) * 2)
    print(ans)
    return

main()
n = int(input())

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

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

mod = 10**9+7
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) - 2*pow(9,N,mod) + pow(8,N,mod)
print(ans)
n=int(input())
m=10**9+7
if n==1:
    print(0)
else:
    print(((2**(n-1)-2)*10+2)%m)
def main():
    n = int(input())
    mod = 10**9+7
    print((pow(10,n,mod)-2 * pow(9,n,mod) + pow(8,n,mod)%mod))

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

if N<2:
	print(0)

else:
	without=10*(N-2)
	considered=(without+2)*(without+1)
	print(considered%(10**9+7))
import math

n = int(input())
if n==1:
    print(0)
else:
    m = math.factorial(n) // (math.factorial(n - 2) * math.factorial(2))
    if m == 1:
        print(2)
    else:
        print((m-2)*10 % 1000000007)
mod = 10**9+7
N = int(input())
a,b,c = 1, 1, 1
for _ in range(N):
    a *= 10
    b *= 9
    c *= 8
    a %= mod
    b %= mod
    c %= mod
ans = a - b - b + c
if ans < 0:
    ans += mod
print(ans)
N = int(input())

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

print(x)
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:
    ans += mod
else:
    ans %= mod
print(ans)
n=int(input())
M=10**9+7
print((pow(10,n,M)-pow(8,n,M))%M)
N = int(input())

_or = 9**N
_and = 8**N
wa = (9**N) * 2 - 8**N
ans = 10**N - wa
print(ans)
mod = 10**9 + 7
n = int(input())
total = 0
for x in range(n):
  total += x

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

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

from math import comb
ans = (10**(N) - 9**N) % divisor

print(ans)
n=int(input())
if n<2:
  print(0)
else:
  mod=10**9+7
  init=(n*(n-1))%mod
  more=pow(10,n-2,mod)
  print((init*more*2)%mod)
N = int(input())
mod = 10 ** 9 + 7
res = (10 ** N) % mod
res -= (9 ** N) % mod # no 9
res -= (9 ** N) % mod # no 0
res += (8 ** N) % mod # no 9 and no 0
print(res)
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 = 10 ** 9 +7
x = (10**N)%mod
y = (2*(9**N))%mod
z = 8**N%mod
print(x-y+z)
N = int(input())

mod = 10**9+7

if N == 1:
    print(0)
elif N == 2:
    print(1)
else:
    tmp = (2*(pow(10,N,mod)-pow(9,N,mod))-(pow(10,N,mod)-pow(8,N,mod)))
    print(tmp)
N=int(input())
mod=10**9+7
l=[1]*3
for _ in range(N):
    l[0]=(l[0]*10)%mod
    l[1]=(l[1]*9)%mod
    l[2]=(l[2]*8)%mod
ans=l[0]+l[2]-2*l[1]
print(ans)
N = int(input())
print(pow(10,N,int(10e9)+7) - 2*pow(9,N,10**9+7) +pow(8, N, 1_000_000_007) % (pow(10,9) +7))
N = int(input())
MOD = 1000000007
A = pow(10, N, MOD)
B = pow(9, N, MOD)
C = pow(8, N, MOD)
X = A - 2 * B + C
print(X)
n = int(input())
mod=10**9+7
ans = pow(10,n,mod)
ans =- pow(2*9,n,mod)
ans =+ pow(8,n,mod)
print(ans%mod)
N = int(input())

print(((N*(N-1))*(10**(N-2)))%1000000007)
# -*- coding: utf-8 -*-
from scipy.special import comb
a = int(input())
mod = 10**9 + 7
x = comb(a, 2, exact=True)
if a <= 1:
    print(0)
    exit(0)
elif a == 2:
    print(2)
    exit(0)

else:
    s = x*2 * (10**(a-2)) % mod
    print(s)
n = int(input())
val1 = 10
val2 = 9
val3 = 8
for i in range(n-1):
    val1 = (val1*10)%(10**9+7)
    val2 = (val2*9)%(10**9+7)
    val3 = (val3*8)%(10**9+7)
print(val1-2*val2+val3)