#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <vector>
using namespace std;
using ll = long long;
#define fst first
#define snd second

/* clang-format off */
template <class T, size_t D> struct _vec { using type = vector<typename _vec<T, D - 1>::type>; };
template <class T> struct _vec<T, 0> { using type = T; };
template <class T, size_t D> using vec = typename _vec<T, D>::type;
template <class T> vector<T> make_v(size_t size, const T& init) { return vector<T>(size, init); }
template <class... Ts> auto make_v(size_t size, Ts... rest) { return vector<decltype(make_v(rest...))>(size, make_v(rest...)); }
template <class T> inline void chmin(T &a, const T& b) { if (b < a) a = b; }
template <class T> inline void chmax(T &a, const T& b) { if (b > a) a = b; }
/* clang-format on */

template <std::uint_fast64_t Modulus>
class modint {
  using u64 = std::uint_fast64_t;

 public:
  u64 a;

  constexpr modint(const u64 x = 0) noexcept
      : a((x % Modulus + Modulus) % Modulus) {
  }
  constexpr u64 &value() noexcept {
    return a;
  }
  constexpr const u64 &value() const noexcept {
    return a;
  }
  constexpr modint operator+(const modint rhs) const noexcept {
    return modint(*this) += rhs;
  }
  constexpr modint operator-(const modint rhs) const noexcept {
    return modint(*this) -= rhs;
  }
  constexpr modint operator*(const modint rhs) const noexcept {
    return modint(*this) *= rhs;
  }
  constexpr modint operator/(const modint rhs) const noexcept {
    return modint(*this) /= rhs;
  }
  constexpr modint &operator+=(const modint rhs) noexcept {
    a += rhs.a;
    if (a >= Modulus) {
      a -= Modulus;
    }
    return *this;
  }
  constexpr modint &operator-=(const modint rhs) noexcept {
    if (a < rhs.a) {
      a += Modulus;
    }
    a -= rhs.a;
    return *this;
  }
  constexpr modint &operator*=(const modint rhs) noexcept {
    a = a * rhs.a % Modulus;
    return *this;
  }
  constexpr modint &operator/=(const modint rhs) noexcept {
    return *this *= ~rhs;
  }
  constexpr modint operator^(u64 exp) const noexcept {
    modint v = 1, x = *this;
    while (exp) {
      if (exp & 1) {
        v *= x;
      }
      x *= x;
      exp >>= 1;
    }
    return v;
  }
  constexpr modint operator~() const noexcept {
    u64 x = a, y = Modulus, u = 1, v = 0;
    while (y) {
      u64 t = x / y;
      swap(x -= t * y, y);
      swap(u -= t * v, v);
    }
    return u;
  }
};

using mint = modint<1000000007>;

template <class T>
vector<T> sumup(const vector<T>& a) {
  int N = a.size();
  vector<T> res(N + 1);
  for (int i = 0; i < N; i++) res[i + 1] = res[i] + a[i];
  return res;
}

ll solve(int N, int H, int D) {
  mint f = 1, fsum = 0;
  for (int i = 1; i <= N; i++) {
    f *= i;
    fsum += f;
  }
  vector<mint> dp(H + 1, mint(0)), sum(H + 2, mint(0));
  for (int h = 1; h <= D; h++) dp[h] = 1;
  for (int h = 1; h <= H; h++) {
    dp[h] += fsum * (sum[h] - sum[max(0, h - D)]);
    sum[h + 1] = sum[h] + dp[h];
  }
  mint res = dp[H] * f;
  return res.value();
}

int main() {
#ifdef DEBUG
  ifstream ifs("in.txt");
  cin.rdbuf(ifs.rdbuf());
#endif
  int N, H, D;
  while (cin >> N >> H >> D) {
    cout << solve(N, H, D) << endl;
  }
  return 0;
}


Measured memory_bytes: 15872