/* 
	بسم الله الرحمن الرحیم

	(; طلا یک جهانی
*/

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

const int MAX_N = 1000 * 1000 + 5, MOD = 1e9 + 7;
int n, h, d, dp[MAX_N], c, sum;

void read_input() {
	cin >> n >> h >> d;
}

void prep() {
	int fac = 1;
	for (int i = 1; i <= n; i++) {
		fac = 1LL * i * fac % MOD;
		(c += fac) %= MOD;
	}
	sum = dp[0] = fac;
}

void solve() {
	prep();
	for (int i = 1; i <= h; i++) {
		dp[i] = sum;
		if (i < h)
			dp[i] = 1LL * dp[i] * c % MOD;
		(sum += dp[i]) %= MOD;
		if (i >= d)
			(sum -= dp[i - d]) %= MOD;
	}
}

void print_output() {
	cout << (dp[h] + MOD) % MOD;
}

int main() {
	ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
	read_input();
	solve();
	print_output();
}
