#include <bits/stdc++.h>
using namespace std;
#define all(V) V.begin(),V.end()
using ll = long long;
const ll MOD = 1000000007;

ll fact[1000010], seg[2097152];

void add(int s, int t, ll v, int k = 1, int l = 0, int r = 1048575) {
	if (t < l || r < s)return;
	if (s <= l && r <= t) {
		seg[k] += v;
		seg[k] %= MOD;
		return;
	}
	add(s, t, v, k * 2, l, (l + r) / 2);
	add(s, t, v, k * 2 + 1, (l + r) / 2 + 1, r);
}

ll gets(int x) {
	ll ans = 0;
	x += 1048576;
	while (x) {
		ans += seg[x];
		ans %= MOD;
		x /= 2;
	}
	return ans;
}

int main() {
	fact[0] = 1;
	ll fr = 0, N, H, D, V;
	for (int i = 0;i < 2097152;i++)seg[i] = 0;
	cin >> N >> H >> D;
	for (ll i = 1;i <= N;i++) {
		fact[i] = fact[i - 1] * i % MOD;
		fr += fact[i];fr %= MOD;
	}
	add(0, 0, fact[N]);
	for (int i = 0;i < H;i++) {
		V = gets(i) * fr % MOD;
		add(i + 1, min(i + D, H), V);
	}
	V = 0;
	for (int i = H - D;i < H;i++)V += gets(i), V %= MOD;
	cout << V << endl;
}