#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <deque>
#include <algorithm>
#include <set>
#include <map>
#include <bitset>
#include <cmath>
#include <functional>
#include <iomanip>
#define vll vector<ll>
#define vvvl vector<vvl>
#define vvl vector<vector<ll>>
#define VV(a, b, c, d) vector<vector<d> >(a, vector<d>(b, c))
#define VVV(a, b, c, d) vector<vvl>(a, vvl(b, vll (c, d)));
#define re(c, b) for(ll c=0;c<b;c++)
#define all(obj) (obj).begin(), (obj).end()
typedef long long int ll;
typedef long double ld;
using namespace std;

//-------------------------------------------------------------------
#define P 1000000007
#define N_MAX 10000000
typedef long long int ll;
ll fac[N_MAX+1];
ll inv[N_MAX+1];
ll finv[N_MAX+1];

ll comb(ll n, ll k){
  if(n<0||k<0||n<k) return 0;
  return (((fac[n]*finv[n-k])%P)*finv[k])%P;
}


void init(){
  fac[0] = finv[0] = fac[1] = finv[1] = inv[1] = 1;
  for(int i = 2; i <= N_MAX; i++){
    fac[i] = (fac[i-1]*i)%P;
    inv[i] = ((-(P/i)*inv[P%i])%P+P)%P;
    finv[i] = (finv[i-1]*inv[i])%P;
  }
}
ll pp(ll a, ll b){
  return (a * b)%P;
}
//-------------------------------------------------------------------
struct LazySegmentTree {
private:
    int n;
    vector<ll> node, lazy;
public:
    LazySegmentTree(vector<ll> v) {
        int sz = (int)v.size();
        n = 1; while(n < sz) n *= 2;
        node.resize(2*n-1);
        lazy.resize(2*n-1, 0);
        for(int i=0; i<sz; i++) node[i+n-1] = v[i];
        for(int i=n-2; i>=0; i--) node[i] = node[i*2+1] + node[i*2+2];
    }

    void eval(int k, int l, int r) {
        if(lazy[k] != 0) {
            node[k] = (node[k] + lazy[k])%P;
            if(r - l > 1) {
                lazy[2*k+1] = (lazy[2*k+1] + pp(lazy[k], inv[2]))%P;
                lazy[2*k+2] = (lazy[2*k+2] + pp(lazy[k], inv[2]))%P;
            }
            lazy[k] = 0;
        }
    }

    void add(int a, int b, ll x, int k=0, int l=0, int r=-1) {
        if(r < 0) r = n;
        eval(k, l, r);
        if(b <= l || r <= a) return;
        if(a <= l && r <= b) {
            lazy[k] = (lazy[k] + ((r-l)*x)%P)%P;
            eval(k, l, r);
        }
        else {
            add(a, b, x, 2*k+1, l, (l+r)/2);
            add(a, b, x, 2*k+2, (l+r)/2, r);
            node[k] = (node[2*k+1] + node[2*k+2])%P;
        }
    }

    ll getsum(int a, int b, int k=0, int l=0, int r=-1) {
        if(r < 0) r = n;
        eval(k, l, r);
        if(b <= l || r <= a) return 0;
        if(a <= l && r <= b) return node[k];
        ll vl = getsum(a, b, 2*k+1, l, (l+r)/2);
        ll vr = getsum(a, b, 2*k+2, (l+r)/2, r);
        return (vl + vr)%P;
    }
};
//最大値がいくらで、最大値がいくつあるか
//最大値xの組み合わせは、
//最大値 y -> x (x>y, y+d<=x, x<=h)となるとき、k個xになる場合
//nPk

// 2
// 1 + 2
int main(int argc, char const *argv[]) {
  ll n, h, d;std::cin >> n >> h >> d;
  init();
  LazySegmentTree seg(vll(h+1, 0));
  seg.add(0, 1, fac[n]);

  vector<ll> pm(n+1, 0);
  for(ll i=1;i<=n;i++) pm[i] = (pm[i-1] + fac[i])%P;

  for(ll i=0;i<h;i++){
    ll now = seg.getsum(i, i+1);
    ll upd = (now * pm[n])%P;
    //std::cout << now << '\n';
    if(i+d>=h){
      seg.add(i+1, h, upd);
      seg.add(h, h+1, now);
    }else seg.add(i+1, i+d+1, upd);
  }
  std::cout << seg.getsum(h, h+1) << '\n';
  return 0;
}


Measured memory_bytes: 275324