#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "unordered_set"
#include "iomanip"
#include "cmath"
#include "random"
#include "bitset"
#include "cstdio"
#include "numeric"
#include "cassert"

using namespace std;

const long long int MOD = 1000000007;
//const int MOD = 998244353;
//const long long int MOD = 998244353;

//int N, M, K, H, W, L, R;
long long int N, M, K, H, W, L, R;

long long int power(long long int x, long long int n, long long int M) {
	long long int ret = 1;
	long long int by = x;
	while (n) {
		if (n & 1) {
			ret *= by;
			ret %= M;
		}
		by *= by;
		by %= M;
		n >>= 1;
	}
	return ret;
}


int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);

	cin >> N;
	cin >> H >> K;
	vector<long long int>by(max(N, H) + 1, 1);
	vector<long long int>rev_by(max(N, H) + 1, 1);
	for (int i = 1; i <= max(N, H); i++) {
		by[i] = by[i - 1] * i;
		by[i] %= MOD;
		rev_by[i] = power(by[i], MOD - 2, MOD);
	}
	long long int box = 0;
	for (int i = 1; i <= N; i++) {
		box += by[i];
		box %= MOD;
	}
	vector<long long int>dp(H + 1);
	dp[0] = by[N];
	for (int i = 1; i <= K; i++)dp[i] = by[N];
	for (int i = 1; i <= H; i++) {
		dp[i] = dp[i - 1];
		if (i - K - 1 >= 0)dp[i] -= dp[i - K - 1];
		dp[i] += MOD;
		dp[i] %= MOD;
		if (i == H)break;
		dp[i] *= box;
		dp[i] %= MOD;
		dp[i] += dp[i - 1];
		dp[i] %= MOD;
	}
	cout << dp.back() << endl;
}