import math

N = int(input().rstrip())

power = math.factorial(N)

print((power % (pow(10, 9) + 7)))
N = int(input().rstrip())

DIV = 10**9 + 7

ans = 1

for n in range(1, N+1):

    ans = (ans * n) % DIV

print(ans)
import math

N = int(input().rstrip())
power = math.factorial(N)
print((power % (pow(10, 9) + 7)))

N = int(input().rstrip())
DIV = 10**9 + 7
ans = 1
for n in range(1, N + 1):
    ans = (ans * n) % DIV
print(ans)

-import math - -power = math.factorial(N) -print((power % (pow(10, 9) + 7))) +DIV = 10**9 + 7 +ans = 1 +for n in range(1, N + 1): +    ans = (ans * n) % DIV +print(ans)