Easy Beginners Problems > Ad-hoc

Birth of a new baby in a family is a matter of joy. This makes everyone in family feel special. The only problem is naming her. Some member of family say that name should start with ‘P’ , and some member of family say that name should start with ‘S’ and so on. ![enter image description here][1] However, there are some concerns for naming new baby: 1. Start character must be written in capital letter ( ‘A’ to ‘Z’ ) 2. End character must be written in capital letter ( ‘A’ to ‘Z’ ) 3. Middle characters must be written in capital letter ( ‘A’ to ‘Z’ ) 4. Remaining characters must be written in either in capital letter ( ‘A’ to ‘Z’ ) or in small letter (‘a’ to ‘z’ ) ---------- Some Valid names are: - SiMaN - SwARnA - SAANVI Some Invalid names are: - biNdu - trishna - DevskiLL Now, you are given the length of baby’s name, your task is to calculate total numbers of variation of name pattern that may exists by following above mentioned concerns. ---------- **Note: Total middle characters will be 2 if the total length of name is even.** Input: ------ Input starts with an integer **T (1<=10)**, denoting the number of test cases. Each case contains an integer **N (1 ≤ N ≤ 10^9)** denoting the Length of name for baby. Output: ------- For each case of input, output the total numbers of variations of name patterns exists by following the valid pattern of naming. As the answer could be very large. so, print the answer modulo **1000000007** Sample Input ------------ 2 1 5 Sample Output ------------- 26 47525504 [1]: https://s3-ap-southeast-1.amazonaws.com/devskillimagestorage/questionimages/1741bca8-2d89-c316-b2cb-08d443580510_b2b0689e1b374ba0bfbefe361a2aee6f_W276xH165.jpg

Bishal Gautam