def div(n,T):

    tmp = 10 ** 9 + 7

    _ = 1

    for t in range( T- 1):

        _ *= n

        _ %= tmp

    return _ * n

    

N = int(eval(input()))

a = div(10,N)

b = div(9,N)

c = div(8,N)

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



def div(n,T):

    _ = 1

    for t in range(T):

        _ *= n

        _ %= tmp

    return _

    

N = int(eval(input()))

a = div(10,N)

b = div(9,N)

c = div(8,N)



print(((a + c - 2 * b) % tmp))
def div(n, T):
    tmp = 10**9 + 7
    _ = 1
    for t in range(T - 1):
        _ *= n
        _ %= tmp
    return _ * n


N = int(eval(input()))
a = div(10, N)
b = div(9, N)
c = div(8, N)
print(((a + c - b * 2) % (10**9 + 7)))

tmp = 10**9 + 7


def div(n, T):
    _ = 1
    for t in range(T):
        _ *= n
        _ %= tmp
    return _


N = int(eval(input()))
a = div(10, N)
b = div(9, N)
c = div(8, N)
print(((a + c - 2 * b) % tmp))

+tmp = 10**9 + 7 + + -    tmp = 10**9 + 7 -    for t in range(T - 1): +    for t in range(T): -    return _ * n +    return _ -print(((a + c - b * 2) % (10**9 + 7))) +print(((a + c - 2 * b) % tmp))