import math



N = int(eval(input()))

ans = 0



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



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

power = 1



for i in range(N):

    power = ((i+1) * power) % 1000000007



print(power)
import math

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

N = int(eval(input()))
power = 1
for i in range(N):
    power = ((i + 1) * power) % 1000000007
print(power)

-import math - -ans = 0 -ans = math.factorial(N) % (10**9 + 7) -print(ans) +power = 1 +for i in range(N): +    power = ((i + 1) * power) % 1000000007 +print(power)