#include <bits/stdc++.h>
using namespace std;
inline int Get() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while ('0' <= ch && ch <= '9') {
    x = (x << 1) + (x << 3) + ch - '0';
    ch = getchar();
  }
  return x * f;
}
const long long mod = 1e9 + 7;
int n, m, k;
long long f[15][1 << 4], g[15][1 << 4];
int bin[1 << 4];
int id[13][1 << 4];
struct matrix {
  int n;
  long long a[210][210];
  matrix() {
    n = 0;
    memset(a, 0, sizeof(a));
  }
} F, ans;
matrix operator*(const matrix &x, const matrix &y) {
  matrix tem;
  tem.n = x.n;
  for (int i = 0; i < tem.n; i++)
    for (int j = 0; j < tem.n; j++)
      for (int k = 0; k < tem.n; k++)
        (tem.a[i][j] += x.a[i][k] * y.a[k][j]) %= mod;
  return tem;
}
matrix ksm(matrix t, long long x) {
  matrix ans;
  ans.n = t.n;
  for (int i = 0; i < t.n; i++) ans.a[i][i] = 1;
  for (; x; x >>= 1, t = t * t)
    if (x & 1) ans = ans * t;
  return ans;
}
int main() {
  n = Get(), k = Get(), m = Get();
  for (int S = 0; S < 1 << m; S++)
    for (int i = 0; i < m; i++) bin[S] += (S >> i & 1);
  int tot = 0;
  for (int i = 0; i <= k; i++)
    for (int S = 0; S < 1 << m; S++) id[i][S] = tot++;
  ans.a[0][id[0][0]] = 1;
  ans.n = tot;
  F.n = tot;
  for (int j = 0; j <= k; j++) {
    for (int S = 0; S < 1 << m; S++) {
      F.a[id[j][S]][id[j][S >> 1]] = 1;
      if (j < k) F.a[id[j][S]][id[j + 1][(S >> 1) | (1 << m - 1)]] = 1 + bin[S];
    }
  }
  ans = ans * ksm(F, n);
  long long Ans = 0;
  for (int S = 0; S < 1 << m; S++) (Ans += ans.a[0][id[k][S]]) %= mod;
  cout << Ans;
  return 0;
}
