#!/usr/bin/env python
from math import factorial
T = int(raw_input())
for _ in xrange(T):
    print(factorial(int(raw_input())))
fbebe50cefb3d9de913c76d5caaa59a3b7e96b1c
<mask token>

<mask token>
for _ in xrange(T):
    print(factorial(int(raw_input())))

<mask token>
T = int(raw_input())
for _ in xrange(T):
    print(factorial(int(raw_input())))

from math import factorial
T = int(raw_input())
for _ in xrange(T):
    print(factorial(int(raw_input())))

#!/usr/bin/env python
from math import factorial
T = int(raw_input())
for _ in xrange(T):
    print(factorial(int(raw_input())))