import math

n = int(eval(input()))



power = math.factorial(n)



print((power % (10**9 + 7)))

import math

n = int(eval(input()))



power = 1



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

    power = i * power % (10**9 + 7)



print(power)

import math

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

import math

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

-power = math.factorial(n) -print((power % (10**9 + 7))) +power = 1 +for i in range(1, n + 1): +    power = i * power % (10**9 + 7) +print(power)