#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef pair<ll,ll> pll;
typedef vector<bool> vb;
const ll oo = 0x3f3f3f3f3f3f3f3f;
const double eps = 1e-9;
#define sz(c) ll((c).size())
#define all(c) begin(c), end(c)
#define FOR(i,a,b) for (ll i = (a); i < (b); i++)
#define FORD(i,a,b) for (ll i = (b)-1; i >= (a); i--)
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define xx first
#define yy second
#define TR(X) ({ if(1) cerr << "TR: " << (#X) << " = " << (X) << endl; })

const ll MOD = 1e9 + 7;

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	
	ll n, d, h;
	cin >> n >> h >> d;
	
	ll sumfac = 0, fac = 1;
	FOR(k,1,n+1) {
		fac = fac*k % MOD;
		sumfac = (sumfac + fac) % MOD;
	}
	
	vl dp(h+1);
	ll sum = dp[h] = 1;
	FORD(k,0,h) {
		dp[k] = (k > 0 ? sumfac : fac) * sum % MOD;
		sum += dp[k];
		if (k+d <= h) sum -= dp[k+d];
		sum %= MOD;
		if (sum < 0) sum += MOD;
	}
	cout << dp[0] << endl;

}

