#!/bin/python3 import math import sys mod=1000000007 def countArray(n, k, x): nu=math.factorial(n-1)%mod den=math.factorial(k-1)%mod return int(nu/den) # Return the number of ways to fill in the array. if __name__ == "__main__": n, k, x = input().strip().split(' ') n, k, x = [int(n), int(k), int(x)] answer = countArray(n, k, x) print(answer)