#include <bits/stdc++.h>
const int N_MAX = 208, mod = 1e9 + 7;
struct Matrix {
  int a[N_MAX][N_MAX];
  Matrix() { memset(a, 0, sizeof a); }
  Matrix(const int &x) {
    memset(a, 0, sizeof a);
    for (int i = 0; i < N_MAX; ++i) a[i][i] = x;
  }
  int *operator[](const int &x) { return a[x]; }
  Matrix operator*(const Matrix &b) {
    Matrix c;
    for (int i = 0; i < N_MAX; ++i)
      for (int j = 0; j < N_MAX; ++j)
        for (int k = 0; k < N_MAX; ++k)
          c[i][j] = (1ll * a[i][k] * b.a[k][j] + c[i][j]) % mod;
    return c;
  }
};
Matrix power(Matrix x, int y) {
  Matrix ret(1);
  while (y) {
    if (y & 1) ret = ret * x;
    x = x * x;
    y >>= 1;
  }
  return ret;
}
int base, popcount[17];
int id(const int &j, const int &S) { return j * base + S; }
int main() {
  int n, k, m;
  scanf("%d%d%d", &n, &k, &m), base = (1 << m);
  for (int i = 1; i < base; ++i) popcount[i] = popcount[i >> 1] + (i & 1);
  Matrix now, trans;
  now[0][id(0, 0)] = 1;
  for (int S = 0; S < base; ++S) {
    for (int j = 0; j <= k; ++j) trans[id(j, S)][id(j, (S << 1) & (~base))] = 1;
    for (int j = 0; j < k; ++j)
      trans[id(j, S)][id(j + 1, (S << 1 | 1) & (~base))] = popcount[S] + 1;
  }
  now = now * power(trans, n);
  int ans = 0;
  for (int i = 0; i < base; ++i) ans = (ans + now[0][id(k, i)]) % mod;
  printf("%d\n", (ans + mod) % mod);
  return 0;
}
