#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
inline int read() {
  int w = 1, s = 0;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    s = s * 10 + ch - '0';
    ch = getchar();
  }
  return w * s;
}
inline long long ksm(long long x, long long y) {
  long long res = 1;
  while (y) {
    if (y & 1) res = res * x % mod;
    x = x * x % mod;
    y >>= 1;
  }
  return res;
}
inline int pls(int a, int b) {
  a += b;
  return a >= mod ? a - mod : a;
}
inline int mns(int a, int b) {
  a -= b;
  return a < 0 ? a + mod : a;
}
int n, k, m, Idx[15][222], cnt;
pair<int, int> tmp[101000];
struct Ma {
  int a[417][417];
  inline void I() {
    memset(a, 0, sizeof(a));
    for (register int i = 1; i <= cnt; ++i) a[i][i] = 1;
  }
} trs, Ans;
inline Ma operator*(Ma p, Ma q) {
  Ma res;
  memset(res.a, 0, sizeof(res.a));
  for (register int i = 1; i <= cnt; ++i)
    for (register int j = 1; j <= cnt; ++j) {
      int k = 1, v = 0;
      unsigned long long w = 0;
      for (; k + 15 <= cnt; k += 16)
        v = (v + (unsigned long long)p.a[i][k] * q.a[k][j] +
             (unsigned long long)p.a[i][k + 1] * q.a[k + 1][j] +
             (unsigned long long)p.a[i][k + 2] * q.a[k + 2][j] +
             (unsigned long long)p.a[i][k + 3] * q.a[k + 3][j] +
             (unsigned long long)p.a[i][k + 4] * q.a[k + 4][j] +
             (unsigned long long)p.a[i][k + 5] * q.a[k + 5][j] +
             (unsigned long long)p.a[i][k + 6] * q.a[k + 6][j] +
             (unsigned long long)p.a[i][k + 7] * q.a[k + 7][j] +
             (unsigned long long)p.a[i][k + 8] * q.a[k + 8][j] +
             (unsigned long long)p.a[i][k + 9] * q.a[k + 9][j] +
             (unsigned long long)p.a[i][k + 10] * q.a[k + 10][j] +
             (unsigned long long)p.a[i][k + 11] * q.a[k + 11][j] +
             (unsigned long long)p.a[i][k + 12] * q.a[k + 12][j] +
             (unsigned long long)p.a[i][k + 13] * q.a[k + 13][j] +
             (unsigned long long)p.a[i][k + 14] * q.a[k + 14][j] +
             (unsigned long long)p.a[i][k + 15] * q.a[k + 15][j]) %
            mod;
      for (; k <= cnt; k++) w += (unsigned long long)p.a[i][k] * q.a[k][j];
      res.a[i][j] = (v + w) % mod;
    }
  return res;
}
inline Ma ksm(Ma x, int y) {
  Ma res;
  res.I();
  while (y) {
    if (y & 1) res = res * x;
    x = x * x;
    y >>= 1;
  }
  return res;
}
inline void Solve() {
  memset(trs.a, 0, sizeof(trs.a));
  memset(Ans.a, 0, sizeof(Ans.a));
  for (register int i = 1; i <= cnt; ++i) {
    pair<int, int> o = tmp[i];
    int fir = o.first, sec = o.second, bit = __builtin_popcount(sec);
    if (sec & 1) {
      sec >>= 1;
      trs.a[i][Idx[fir][sec]] = bit;
      sec |= (1 << m);
      fir++;
      trs.a[i][Idx[fir][sec]] = bit;
    } else {
      sec >>= 1;
      trs.a[i][Idx[fir][sec]] = 1;
      sec |= (1 << m);
      fir++;
      trs.a[i][Idx[fir][sec]] = 1;
    }
  }
  for (register int i = 1; i <= cnt; ++i) {
    pair<int, int> o = tmp[i];
    int fir = o.first, sec = o.second, bit = __builtin_popcount(sec);
    if (fir == bit) Ans.a[1][i] = 1;
  }
  Ans = Ans * ksm(trs, n - m - 1);
  long long ans = 0;
  for (register int i = 1; i <= cnt; ++i) {
    pair<int, int> o = tmp[i];
    int fir = o.first, sec = o.second, bit = __builtin_popcount(sec);
    int oo = 1;
    for (register int i = 1; i <= bit; ++i) oo *= i;
    if (fir == k) {
      ans = pls(ans, 1ll * Ans.a[1][i] * oo % mod);
    }
  }
  cout << ans;
}
int main() {
  n = read(), k = read(), m = read();
  m = min(m, n - 1);
  int all = 1 << (m + 1);
  all--;
  for (register int i = 0; i <= k; ++i) {
    for (register int j = 0; j <= all; ++j) {
      Idx[i][j] = ++cnt;
      tmp[cnt] = make_pair(i, j);
    }
  }
  Solve();
  return 0;
}
