1.

/**
* ACM Training 2009
* ACM Problem #11609 - Teams
* Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=78&page=show_problem&problem=2656
*
* @author Felix Dietrich
* @version 1.0, 09/21/2009
*
* Methode: BigInteger, Modulo
* Status : Accepted
* Runtime: 0.1
*/

import java.io.*;
import java.math.BigInteger;


public class Main
{
public static int faculty(long n)
{
long result=1;
while(n > 1)
{
result = (result*n)%1000000007;
n--;
}
return (int)result;
}

public static void main(String... strings ) throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

int testCases = Integer.parseInt(br.readLine().trim());

BigInteger bi = BigInteger.valueOf(2);

System.out.println(faculty(1000000000));
System.out.println("done");

for(int i=0; i<testCases; i++)
{
int n = Integer.parseInt(br.readLine().trim());

System.out.println((bi.pow(n).add(BigInteger.valueOf(2 * faculty(n-1)))));
}
}
}