
#include <cstdio>
#include <algorithm>

constexpr int mod = 1000000007;
int dp[1000000] = {};

int main() {
  int N, H, D;
  scanf("%d %d %d", &N, &H, &D);
  long long coeff = 0;
  long long fact = 1;
  for (int i = 1; i <= N; ++i) {
    if ((coeff += ((fact *= i) %= mod)) >= mod) coeff -= mod;
  }
  std::fill(dp, dp + D, fact);
  int sum = dp[0];
  for (int i = 1; i < H; ++i) {
    if ((dp[i] += (coeff * sum) % mod) >= mod) dp[i] -= mod;
    if ((sum += dp[i]) >= mod) sum -= mod;
    if (i >= D) if ((sum -= dp[i - D]) < 0) sum += mod;
  }
  printf("%d\n", dp[H - 1]);
}
