A tutorial for this problem is now available on our blog. Click here to read it. 

You are asked to calculate factorials of some small positive integers.

Input

An integer t, 1 ≤ t ≤ 100, denoting the number of testcases, followed by t lines, each containing a single integer n, 1 ≤ n ≤ 100.
Output

For each integer n given at input, display a line with the value of n!
Example

Sample input:

4
1
2
5
3


Sample output:

1
2
120
6
q = int(raw_input())
while q!=0:
	num = int(raw_input())

	factorial = 1

# check if the number is negative, positive or zero
	if num < 0:
			print("Sorry, factorial does not exist for negative numbers")
	elif num == 0:
			print(1)
	else:
		for i in range(1,num + 1):
			factorial = factorial*i
		print(factorial)
	q=q-1