#pragma GCC optimize("O2,Ofast,inline,unroll-all-loops,-ffast-math")
#pragma GCC target("popcnt")
#include <bits/stdc++.h>
#define maxn 1000010
#define ll long long
#define ull unsigned long long
#define ld long double
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define pob pop_back
#define pf push_front
#define pof pop_front
#define pii pair<int, int>
#define pil pair<int, ll>
#define pll pair<ll, ll>
#define IL inline
#define ss system
using namespace std;

int n, h, d;
ll f[maxn], s[maxn], fac[maxn], sum = 0;
const ll p = 1e9 + 7;
template <class T> void read(T &x) {
  char ch = x = 0;
  bool fl = false;
  while (!isdigit(ch))
    fl |= ch == '-', ch = getchar();
  while (isdigit(ch))
    x = x * 10 + ch - '0', ch = getchar();
  x = fl ? -x : x;
}
int main() {
  cin >> n >> h >> d, fac[0] = 1;
  for (int i = 1; i <= n; i++) {
    fac[i] = fac[i - 1] * i % p;
  }
  f[0] = s[0] = fac[n];
  for (int i = 1; i <= n; i++) {
    sum = (sum + fac[i]) % p;
  }
  for (int i = 1; i <= h; i++) {
    f[i] = (s[i - 1] - (i > d ? s[i - d - 1] : 0) + p) % p * (i == h ? 1 : sum) % p;
    s[i] = (s[i - 1] + f[i]) % p;
  }
  cout << f[h] << endl;
  return 0;
}