MAIN113  Special String
A string of letters X, Y, Z is special if there are three consecutive letters from which one is X, one is Y, and one is Z. For example, XYZXYZ is special, while XXYYZ is not. Your task is to calculate how many such strings of length n are not special.
Input
First line contains an integer T(1 <= T <= 30) which denotes the total number of test cases. Each test case contains an integer N(1 <= N <= 30) in a single line.
Output
For each test case print total number of strings which have a length N and are not special.
Example
Input:
1
2
Output:
9
hide comments
paras meena:
20131205 12:28:24
Why Math... :(


SYNTAX TERROR:
20131020 20:25:18
Please give some more test cases.. problem is not clear.. In case of strings be a little more descriptive 

samuel:
20130705 02:30:33
nice problem!


Parshant garg:
20130514 09:45:05
is xyzx or xyyyyxyz is special?


moustafa maher:
20130425 06:20:05
@admin...plz post back the comment of akuya :D :D


RAMAKRISHNAN.K:
20130329 06:37:30
More testcases please..


The Mundane Programmer:
20130314 03:43:44
GOT AC , just easy one..... Last edit: 20130314 03:46:00 

Sardar Khan:
20120901 19:41:45
@akuya: thnkx ur comment helped!!:) 

BOND:
20120818 09:54:05
I had to comment on this, it took nearly 3 hrs, and now feeling relieved after seeing that green bar... 
Added by:  amit karmakar 
Date:  20110815 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 