from math import factorial as f

n = int(eval(input()))

print((f(n) % (10 ** 9 + 7)))
n = int(eval(input()))

p = 1

for i in range(n):

    p = (p * (i+1)) % (10 ** 9 + 7)

print(p)
from math import factorial as f

n = int(eval(input()))
print((f(n) % (10**9 + 7)))

n = int(eval(input()))
p = 1
for i in range(n):
    p = (p * (i + 1)) % (10**9 + 7)
print(p)

-from math import factorial as f - -print((f(n) % (10**9 + 7))) +p = 1 +for i in range(n): +    p = (p * (i + 1)) % (10**9 + 7) +print(p)