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

result = N * (N-1)

print(result % 1000000007)
def power_func(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())
answer = power_func(10,N,pow(10,9) + 7) + power_func(8,N,pow(10,9) + 7) - 2 * power_func(9,N,pow(10,9) + 7)
print(answer)
import math


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


N = int(input())

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

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

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

x = n*(n-1)*2*(10**(n-2))

print(x%(10**9 + 7))
n = int(input())
def count_row(n):
    a = n * (n-1) * 10 ** (n-2)
    a %= 10 ** 9 + 7
    return a
print(count_row(n))
n = int(input())

if n <= 1:
  ans = 0
else:
  ans = (n*(n - 1)*(10 ** (n - 2))) % 1000000007
  
print(ans)
n = int(input())
mod= 10 ** 9 + 7
ans = (2*(10**n-9**n))-(10**n-8**n)%mod
print(ans)
#!/usr/bin/env python3
import math


def main():
    n = int(input())
    mod = 10**9 + 7
    if n == 1:
        ans = 0
    else:
        ans = (math.factorial(n) * (10 ** (n - 2))) % mod
    print(ans)


if __name__ == "__main__":
    main()
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 = 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 - 2*b +c
if ans < 0:
    ans += mod
print(ans)
n = int(input())

c = 1
ans =1

for i in range(n) :
    ans = ans * (pow(8,i+1)%1000000007) % 1000000007
print(ans)
n = int(input())
c = 10 ** 9 + 7

g_1 = 1
g_2 = 19
f_1 = 0
f_2 = 2

ans = 0
if n == 1:
  print(0)
elif n == 2:
  print(2)
else:
  prev_f = f_2
  prev_g = g_2
  for i in range(3, n + 1):
    g = 10 ** (i-2) + 9 * prev_g
    f1 = (2 * g) % c
    f2 = (8 * prev_f) % c
    f = (f1 + f2) % c
    ans += (f % c)
    prev_f = f
    prev_g = g
  print(ans)
n = int(input())

if n == 1:
    print(0)

mod = 10 ** 9 + 7

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

print(ans)
def resolve():
    from itertools import permutations
    n = int(input())
    RES = 10 ** 9 + 1
    ans = 0
    ls = list(permutations(list(range(10)), n))

    for l in ls:
        if 0 in l and 9 in l:
            ans += 1
        ans = ans % RES
    print(ans)

resolve()
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())
mod = 10** + 7
if N == 1:
  print(0)
else:
  ans = N*10**(N-2)
  print(ans%mod)
s = int(input())
ans = (s * (s - 1)) % 1000000007
print(ans)
n = int(input(''))

mod = 1000000007

cnt_all= 10**n
cnt_90=8**n
cnt_9=9**n
cnt_0=9**n
cnt=cnt_all + cnt_90 - cnt_9 - cnt_0
#print("{} - {} - {} + {} = {}".format(cnt_all,cnt_9,cnt_0,cnt_90,cnt))
print(cnt)
n = int(input())
if n == 2:
    print(2)
else:
    if n < 2:
        print(0)
    else:
        print(2*pow(9, n - 2))
import math
n = int(input())
x = (math.factorial(n)*10**(n-2))%(10**9+7)
print(x)
import sys
import itertools

N = int(input())
a = N * (N-1)


# a %= 10 ** 9 + 7

a *= (10**(N-2))

a %= 10 ** 9 + 7
print(a)
N = int(input())
MOD = 10**9 + 7
if N<=1:
  print(0)
  
else:
  all_num = pow(10, N, MOD)
  ans = all_num - 2 * pow(9, N, MOD) + pow(8, N, MOD)
  print(ans)
N = int(input())
s = (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

#ans = N*(N-1)*(10**(N-2))
#print(ans)
#
#ans2 = ans % s
#print(ans2)

ans3 = N*(N-1)*power_func(10,N-2,s)
print(ans3 % s)

#ans = 10**N - (N*(10**(N-1))*2)+N*(N-1)*(10**(N-2))
#print(ans)
def main():
    n = int(input())
    # a, b, c, d = map(int, input().split())
    # l = list(map(int, input().split()))
    # s = input()
    print((10**n - 9**n) * 2 % (10**9 + 7) - (10**n-8**n) % (10**9 + 7))


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

print(((N*(N-1))*(10**(N-1))-(6**(N-2)))%1000000007)
N=int(input())
print(int((N*(N-1)*10**(N-2))%((10**9)+7)))
n = int(input())
x = n*(n-1)%1000000007
y = 10**(n-2)%1000000007
print((x*y)%1000000007)
import math
N = int(input())
if N == 1:
  print(0)
elif N == 2:
  print(2)
else:
  print(int((2*(10**N-9**N))-((10**N-8**N)) %(10**9+7)))
#!/usr/bin/env python

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

tot = 10**n

inc0 = (tot - 9**n)%mod
inc9 = (tot - 9**n)%mod
inc0or9 = (tot - 8**n)%mod

ans = inc0+inc9-inc0or9
print(ans)
n = int(input())
mod = 1000000007
if n < 2:
    print(0)
else:
    print(pow(10, n, mod) - 2 * pow(9, n, mod) + pow(8, n, mod))
N = int(input())
MOD = 10 ** 9 + 7

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

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

ans=(10^(N-2)+(10^(N-1)-9^(N-1))+(10^N-9^N))*2
print(ans%(10^9+7))
N = int(input())
if N==1:
  print(0)
elif N==2:
  print(2)
else:
  from scipy.special import comb
  a = comb(N, 2, exact=True)
  print((10**(N-2)*a*2)%(10**9+7))
import sys

#a^n mod p を求める
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

input = sys.stdin.readline

n = int(input())
p = 1000000007
n_10 = power_func(10,n,p)
n_9 = power_func(9,n,p) * 2 % p

n_8 = power_func(8,n,p)

print(n_10 - n_9 + n_8)
import math

a = int(input())
ans = math.factorial(a)
new_ans = ans // (10 ** 9 + 7)
print(new_ans)
n = int(input())
mod = 10 ** 9 + 7
print((pow(10, n, mod) - 2 * pow(9, n, mod) + pow(8, n, mod)))
p=10**9+7
def pow(x, n):
    res = 1
    while n > 0:
        if n & 1 == 1:
            res *= x
        x *= x
        res = res%p
        n >>= 1
    return res

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

print(10**N - 9**N - 9**N + 8**N)
n = int(input())
inf = 1000000000 + 7
a=1; d=4
num = int(2*n*(n-1)) % inf
if n==2: ans=2
elif n==1: ans=0
elif n>2:
    for i in range(n-2):
        a = int(int(8*a) % inf)
        d = int(int(2*d) % inf)
    a = int(a%inf)*int(num%inf)
    ans = int(int(a%inf) + int(d%inf))%inf
print(int(ans))
n = int(input())
mod = 10**9+7

def pow(n, num):
  s = num
  for i in range(1,num):
    s = s*num%mod
  return s
print((pow(n,10) - 2*pow(n,9) + pow(n,8))%mod)
import math
n=int(input())
print((math.factorial(n) * (10 ** (n - 2) - 1)) % ((10 ** 9) + 7))
MAX=10**9 + 7
n = int(input())
print(pow(10,n,MAX) - (pow(9,n,MAX)*2)%MAX + pow(8,n,MAX))
#!/usr/bin/env python3
import sys

MOD = 1000000007  # type: int


def solve(N: int):
    return N*10**(N-2)%MOD


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

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

if N<2:
	print(0)

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

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

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

if n == 1:
    print(0)
    
else:
    total = 1
    _0or9 = 1
    _0and9 = 1
    
    for i in range(n):
        total *= 10
        total %= 10**9 + 7
        
        _0or9 *= 9
        _0or9 %= 10**9 + 7
        
        _0and9 *= 8
        _0and9 %= 10**9 + 7
        
    print(total - 2*_0or9 + _0and9)
n = int(input())
val1 = 10
val2 = 9
val3 = 8
if n == 1:
    print(0)
else:
    for i in range(n-1):
        val1 = (val1*10)%(10**9+7)
        val2 = (val2*9)%(10**9+7)
        val3 = (val3*8)%(10**9+7)
    ans = int(val1-2*val2+val3)
    if ans<0:
        print(ans+1000000007)
    else:
        print(ans)
N = int(input())

MOD = 1000000007

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

print(ans)
# 整数の入力
N = int(input())
 
print( (8**(N-2) * N * (N-1) - (N * (N-1))) % (10**9 + 7))
import math


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


N = int(input())
ans = 0
if N == 1:
    ans = 0
elif N == 2:
    ans = 2
else:
    for i in range(N):
        ans *= 10 % 1000000007
    ans *= combinations_count(N, 2)
    ans = ans % 1000000007

print(ans)
n = int(input())
if n==1:
	print(0)
elif n==2:
	print(2)
else:
	com = (n-1)*(n)*((8)**(n-2))
	res = (com)
	mod = (10**9) + 7
	answer = res % mod
	print(answer)
#C
n = int(input())
mod = 10**9+7

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

n = int(input())

if n == 1 :
    print(0)
else :
    ans = (math.factorial(n)*pow(10, n-2))%(pow(10, 9)+7)
    print(ans)
import itertools as it

n = int(input())
if n == 1:
    ans = 0
r = n-2

if n != 1:
    combo0 = list(map(list,it.combinations_with_replacement([0,1,2,3,4,5,6,7,8,9], r)))
    l = len(combo0)
    for i in range(l):
        combo0[i].append(0)
        combo0[i].append(9)
    x = 0
    for j in range(l):
        y = len(list(map(list, it.permutations(combo0[j]))))
        x = x + y

    z = 10**9 + 7
    ans = x % z

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

if N<2:
	print(0)

else:
	without=10**(N-2)
	considered=(without+2)*(without+1)
	considered=considered%(1000000007)
	print(considered)
N=int(input())

if N<2:
	print(0)

else:
	without=10*(N-2)
	considered=(without+2)*(without+1)
	considered=considered%(1000000007)
	print(considered)
N = int(input())

output1 = (10 ** N) % 1000000007
output2 = (2 * (9 ** N)) % 1000000007
output3 = (8 ** N) % 1000000007
output = output1 - output2 + output3
ouput = output % 1000000007
        
print(output)
def pow_k(x, n):
    if n == 0:
        return 1
    K = 1
    while n > 1:
        if n % 2 != 0:
            K = K * x
            x = x ** 2
            n = (n - 1) // 2
        else:
            x = x ** 2
            n = n // 2

    return K * x 

n = int(input())
ans = n*(n-1)
ans *= pow_k(10,n-2)
if n>2:ans -= n*(n-1)//2
print(ans%1000000007)
n = int(input())
print(n*(n-1)*pow(9,n-2,10**9+7)%(10**9+7))
n = int(input())
tmp = n
res=1
ans=0
mod = 10**9+7
for i in range(1,n):
    res*=tmp
    tmp-=1
    ans+=res
    ans%=mod
print(ans)
mod=1000000007
n=int(input())
print(0 if n==1 else pow(10,n,mod)-1)
n=int(input())
if n==1:
    print(0)
else:
    num=0
    k=2
    l=8**(n-1)
    for i in range(2,n+1):
        k*=2
        l//=8
        num+=(k-2)*l
        num%=(10**9+7)
    print(num%(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 = int(1e9+7)

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

MOD = 100000007
n = int(input())
ans = (10 ** (n - 2))
for i in range(n, 0, -1):
	ans *= i
ans -= n * (n - 1) * (n - 2) * (n - 3)
ans %= MOD
print(ans)
n=int(input())
if n==1:
  print(0)
else:
  print((10**n-(8*10**(n-1))-2*(9**(n-1)))%(10**9+7))
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)
else:
    print(b+a)
n=int(input())
x=(10**n)%(10**9+7)
y=(9**n)%(10**9+7)
z=(8**n)%(10**9+7)
print(x-2*y+z)
#ABC178C

N = int(input())

def Caculation(N):
    combination = 4 * (9**(N-2))
    ans = combination % (10**9 + 7)
    print(ans)

if N <= 1:
    print(0)
else:
    Caculation(N)
n=int(input())
c=10**9+7
def pow_c(x,n,c):
    if n == 0:
        return 1
    K = 1
    while n > 1:
        if n % 2 != 0:
            K= (K%c)*(x%c)%c
        x = ((x%c)**2)%c
        n //= 2
    return (K%c) * (x%c) %c

k10=pow_c(10,n,c)
k9=pow_c(9,n,c)
k8=pow_c(8,n,c)
ans=(k10-2*k9+k8)%c
N = int(input())
mod = 10**9+7
ans = pow(10, N, mod) - pow(9,N, mod)*2 + pow(8,N, mod)
print(ans)
mod=10**9 + 7
n=int(input())
print(pow(10,n,mod)-pow(8,n,mod))
N = int(input())
MOD = 1e9+7

def powmod(x, y):
    res = 1
    for p in range(y):
        res = res*x%MOD
    return res

ans = powmod(10,N)-powmod(9,N)-powmod(9,N)+powmod(8,N)
print(int(ans))
N=int(input())

#Ai=0を含まない...9^N
#Ai=9を含まない...9^N
#Ai=0,Ai=9を含まない...8^N
#全てで10^N通り
#Ai=0,Ai=9の少なくとも一方が存在しない 9^N+9^N-8^N
#答は10^N-9^N-9^N+8^N

A=10**N
B=9**N
C=8**N

A=A%(10**9+7)
B=B%(10**9+7)
C=C%(10**9+7)

print(A-B*2+C)
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(int(a-2*b+c))
import math


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


N = int(input())

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

p = permutations_count(N, 2)
ans = (p * (10 ** (N-2)) - p) % (10**9 + 7)

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

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

kekka = (pow(10,n-1)-2*pow(9,n-1))%1000000007

print(kekka)
n=int(input())
mod=10**9+7
ans=0
ans=(2**n)%mod
ans-=2
if n>2:
    ans2=(8**(n-2))%mod
    ans2*=n*(n-1)
    ans2%=mod
    ans+=ans2
print(ans%mod)
import math
n=int(input())
print((pow(2,n)-2)%1000000007)
N = int(input())
MOD = 10**9+7
ans = 10**N%MOD - 9**N%MOD*2%MOD + 8**N%MOD
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 =input()
N = int(N)
x = 9 ** N
y = 8 ** N
z = 10 ** N - 2 * x + y
print(z)
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
    print(y)
n = int(input())
mod = 10**9 + 7

ans = pow(10,n,mod) - pow(9,n,mod)*2 + pow(8,n,mod)
print(ans)
n = int(input())
if n == 2:
    print(2)
else:
    if n < 2:
        print(0)
    else:
        dp = [0, 1, 1, 2]
        for i in range(3, n + 1):
            dp.append(dp[i]*i)

        print(dp[n+1]%(pow(10, 9) + 7))
n=int(input())
p=1
q=1
r=1
for i in range(n):
    p=p*10
    q=q*9
    r=r*8

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

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

x = 1
y = 1
z = 1000000007
for i in range( n-1 ):
    x = ( x * 10 ) % z
    y = ( y * 8 ) % z

ans = x - y
print( ans )
N = int(input())

a = 2*(10^N-9^N)-(10^N-8^N)
ans = a % (10^9+7)
print(ans)
MOD = 10**9 + 7
import sys
input = sys.stdin.readline
N = int(input())

ans = pow(10,N,MOD)
ans -= 2*pow(9,N,MOD)
ans += pow(8,N,MOD)
print(ans)
n=int(input())
s=0
for i in range(n-1):
    p=10**i*9**(n-i-2)
    s+=p%1000000007
print(int(2*s))
N = int(input())
print((10 ** N - 8 ** N) % (10 ** 9 + 7))
# -*- 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)
    ans = 10 ** (N - 2) * C % MOD
    
    print(int(ans))
def bigmod(v, n10, m):
    """
    >>> bigmod(1, 2, 9)
    1
    >>> bigmod(2343413, 10, 100005)
    1
    """
    # print((v*10.**n10) % m)
    v %= m
    while n10>0:
        v *= 10
        n10 -= 1
        v %= m
    return v

def main():
    n = int(input())
    m = int(10**9+7)
    a = bigmod(n*(n-1), n-2, m)

    print(a)

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

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

    print(ans)


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


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

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

res = pow(10, n-2)*n*(n-1)

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

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

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


def fac_mod(a, b):
    x = 1
    for i in range(1, b+1):
        x = (x*a) % M
    return x


A = fac_mod(10, N) - fac_mod(9, N) * 2 + fac_mod(8, N) % M
if A < 0:
    A = M - A
print(A)
N = int(input())

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

print(nn - nm)
n=int(input())
mod=1000000007
ten=1
nine=1
eight=1
for _ in range(n):
    nine *= 9
    ten *= 10
    eight *= 8
    nine %= mod
    eight%=mod
print(ten+eight-nine-nine)
#!/usr/bin/env python3
import sys

MOD = 1000000007  # type: int


def solve(N: int):
    return print((10**N - 2*9**N + 8**N))

# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

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

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

print(nn - nm)
import math
def use(a,n,x):
    if n==0:
        return 1

    if n%2!=0:
        hold=use(a,n//2,x)
        return (a*hold*hold)%(x)
    else:
        hold=use(a,n//2,x)
        return (hold*hold)%(x)
n=int(input())

if n<2:
    print(0)


else:
    x=(10**9 +7)
    ans=use(10,n,x)

    s=2*use(9,n,x)

    y=use(8,n,x)

    print(int(ans+y-s))
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())
a = (10**N-8**N)%(10**9+7)
print(a)
N = int(input())

print(((N*(N-1))*(10**(N-2))-(6**(N-2)))%1000000007)
n = int(input())
res = 0
mod = (10**9+7)
from scipy.special import perm
from scipy.special import comb
# a = comb(n, r)
a = perm(n,2)
b = 10**(n-2) % mod
res = int(((a * b) % mod))


# res = a + b - c
print(res)
from math import comb

if __name__=="__main__":
  N=int(input())
  if N<2:
    print(0)
  else:
    print(comb(N,2)%(10**9+7))
import math
N = int(input())

answer = 0
rest = 10 ** 9 + 7

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

if N == 1:
  answer = 0
else:
  answer = (combinations_count(N, 2) * 2) * math.factorial(N-2)
print(answer % rest)
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())

m=1
s=1000000007

for i in range(1,n+1):
    if m<s:
        m=m*i
    else:
        m=(m%s)*i
        
k=1

for i in range(1,n-1):
    if k<s:
        k=k*8
    else:
        k=(k%s)*8
        
p=(m*k)%s
print(p)
n = int(input())
mod = 10**9+7

def pow(n, num):
  s = num
  for i in range(1,num):
    s += s*num%mod
  return s
print((pow(n,10) - 2*pow(n,9) + pow(n,8))%mod)
import itertools
n = int(input())
a = ["0","9","x"]

if n == 1:
  print(0)
elif n == 2:
  print(2)
else:
  count = 0
  for v in itertools.product(a, repeat=n):
    l = list(v)
    if "0" in l and "9" in l and "x" in l:
      count += 9**l.count("x")
  print(count%(10**9+7))
N = int(input())
 
MOD = 10**9 + 7
 
if N==1:
    print(0)
elif N==2:
    print(2)
else:
    ans = pow(10,N,MOD) - 2*pow(9,N,MOD) + pow(8,N,MOD)
    print(ans)
n=int(input())
mod=int(1e9+7)
if n==1:
  print(0)
else:
	print(2*pow(10,n-2,mod)%mod)
n = int(input())
mod = 10**9+7

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

print(ans%mod)
p = 10 ** 9 + 7
N = int(input())
fact = [1, 1]  
factinv = [1, 1] 
inv = [0, 1] 

for i in range(2, N + 1):
    fact.append((fact[-1] * i) % p)
    inv.append((-inv[p % i] * (p // i)) % p)
    factinv.append((factinv[-1] * inv[-1]) % p)


def cmb(n, r, p):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n-r] % p

n = N
r = 1
print(cmb(n, r, p))
"""
int(input())
map(int, input().split())
list(map(int, input().split()))
input()
input().split()
"""


n = int(input())
mod = 1000000007
tmp = (10**n)%mod
diff = 2*(9**n)%mod
eight = (8**n)%mod

ans = tmp - diff + eight
print(ans)
x=int(input())
y=10^x- 9^x -9^x-8^x
print(y)
n = int(input())
if n <= 1:
    print(0)

else:

    mod = 10 ** 9 + 7

    print(pow(10, n, mod) - 2 * pow(9, n, mod) +  pow(8, n, mod))
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) # 全て
ans = c-2*b+a
if ans < 0:
    ans += mod
print(ans)
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))

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

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

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

# out = (N * (N - 1) * (10 ** (N - 2))) % ((10 ** 9) + 7)
out = ((10 ** N) - ((9 ** N) * 2 - (8 ** N))) % ((10 ** 9) + 7)
print(out)
n = int(input())
def power_func(a,n,p):
    bi = str(format(n,"b"))#2進表現に
    res = 1
    for i in range(len(bi)):
        res = (res*res) %p
        if bi[i] == "1":
            res = (res*a) %p
    return res
if n == 1:
    print(0)
else:
    mod = 10**9+7
    print(power_func(10, n, mod)-(power_func(9, n, mod)*2-power_func(8, n, mod)))
N = int(input())
a = (10**N*+8**N-2*(9**N))%((10**9)+7)
print(a)
n = int(input())
mod = 10**9+7
ans = pow(10,n,mod)-pow(9,n,mod)*2+pow(8,n,mod)
print(ans)
N = int(input())
m = 10**9 +7
result = pow(10,N,m) - 2*pow(9,N,m) + pow(8,N,m)
print(result)
N = int(input())
mod = 10**9+7
print(10**N%mod - 2*9**N%mod + 8**N%mod)
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 % (10 ** 9 + 7))
N = int(input())
mod = 10**9 + 7

comb = N * (N - 1) // 2
comb0and9 = comb * 2 * (10**(N-2))

ans = comb0and9 % mod
print(ans)
N=int(input()) #標準入力
zero_nine=N*(N-1) #N個の中からどれを0と9に選出するか？
other_numbers=10**(N-2) #0と9以外の要素の選び方は？
if other_numbers<=1:
    answer=zero_nine
else:
    answer = zero_nine*other_numbers
warukazu=10**9+7
print(int(answer%warukazu))
import math
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

N = int(input())

answer = 0
rest = 10 ** 9 + 7
  
if N == 1:
  answer = 0
else:
  answer = cmb(N, 2) * 2 * (10 ** (N - 2))
print(answer % rest)
n = int(input())
mod = 10**9 + 7
print((10**n % mod - (2*(9**n)) % mod + (8**n) % mod) )
n = int(input())
if n == 1:
    print(0)
if n == 2:
    print(2)
else:
    print((10**n-(2*9**n-8**n))%(10**9+7))
n = int(input())
print( ( (10 ** (n - 2) % (10 ** 9 + 7)) * ((n * (n-1) // 2) % (10 ** 9 + 7)) * 2) % (10 ** 9 + 7) )
N=869121

if N<2:
	print(0)

else:
	without=10**(N-2)
	considered=(without+2)*(without+1)
	considered=considered%(1000000007)
	print(considered)
n = int(input())
MOD = 10 ** 9 + 7
print(pow(10, n, MOD) - 2 * pow(9, n, MOD) + pow(8, n, MOD))
k = int(input())
if k < 2:
	print(0)
else:
	num = 2*(k*2-3)
	num2 = num*10 - num
#	print(num2)
	waru = 10**9+7
#	print(waru)
	print(num2 % waru)