import math

N = int(eval(input()))

ans = math.factorial(N) % (10 ** 9 + 7)

print(ans)
n = int(eval(input()))

from functools import reduce

print((reduce(lambda x,y:x*y%1000000007,list(range(1,n+1)))))
import math

N = int(eval(input()))
ans = math.factorial(N) % (10**9 + 7)
print(ans)

n = int(eval(input()))
from functools import reduce

print((reduce(lambda x, y: x * y % 1000000007, list(range(1, n + 1)))))

-import math +n = int(eval(input())) +from functools import reduce -N = int(eval(input())) -ans = math.factorial(N) % (10**9 + 7) -print(ans) +print((reduce(lambda x, y: x * y % 1000000007, list(range(1, n + 1)))))