akashs-girlfriend
Source: hackerearth
Difficulty: MEDIUM

Akash singh is a student of Mathematics at Geekland University. These days he is busy with his girlfriend Jassi. On the other hand, Jassi don't like mathematics that much. One day, Jassi decided to find all the strings of length N (comprising only of characters from '0' to '9') having odd number of 0's.
For Example: 103,012,000 are all strings of length 3 having Odd number of 0's.
She asked Akash to find number of such strings of for a given length of string modulus 1000000009 (10^9 + 9). Akash being busy in organizing college fest asks for your help. Help Akash impressing his girlfriend.

Input: 

First line of input contains an integer t(t ≤ 10000) which is the number of test cases, then, t lines follow each containing an integer N ≤ 10^18

Output:

For each test case print single integer, the number of strings of length N comprising only of characters from '0' to '9'. Having odd number of zeroes. 

SAMPLE INPUT
2
1
2

SAMPLE OUTPUT
1
18

Explanation

Case 1:  only possible case is '0'. 
Case 2: The following string of length 2 contains odd number of zeroes: 
            01,02...,09,10 --> 10 numbers
            20,30,...,90 ---> 8 numbers
            total 18 numbers


'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''
t=eval(input())
for i in range (0,t):
	n=eval(input())
	print((pow(2,n-1,10**9+9)*(pow(5,n,10**9+9)-pow(4,n,10**9+9)))%(10**9+9))