#include <bits/stdc++.h>
using namespace std;
struct matrix {
  int jz[208][208];
  inline void unit() {
    clear();
    for (int i(0); i < 208; ++i) jz[i][i] = 1;
  }
  inline void clear() { memset(jz, 0, sizeof(jz)); }
  inline matrix operator*(const matrix& x) const {
    matrix y;
    y.clear();
    for (int i(0), j, k; i < 208; ++i)
      for (j = 0; j < 208; ++j)
        for (k = 0; k < 208; ++k)
          y.jz[i][j] = (y.jz[i][j] + jz[i][k] * 1ll * x.jz[k][j]) % 1000000007;
    return y;
  }
  template <class free>
  inline matrix operator^(free y) {
    matrix ans, x(*this);
    ans.unit();
    while (y) {
      if (y & 1) ans = ans * x;
      x = x * x, y >>= 1;
    }
    return ans;
  }
  inline matrix operator^(int y) {
    matrix ans, x(*this);
    ans.unit();
    while (y) {
      if (y & 1) ans = ans * x;
      x = x * x, y >>= 1;
    }
    return ans;
  }
} tran, state;
int id[208][208], tot[208];
int main() {
  int n, K, m;
  cin >> n >> K >> m;
  for (int i(0), j, k(0); i <= K; ++i)
    for (j = 0; j < 1 << m; ++j) id[i][j] = k++;
  for (int i(1); i < 208; ++i) tot[i] = tot[i ^ i & -i] + 1;
  for (int i(0), j; i <= K; ++i)
    for (j = 0; j < 1 << m; ++j) {
      if (j & 1) {
        if (!i) continue;
        tran.jz[id[i - 1][j >> 1]][id[i][j]] = tot[j],
                               tran.jz[id[i - 1][j >> 1 | 1 << m - 1]]
                                      [id[i][j]] = 1 + tot[j];
      } else
        tran.jz[id[i][j >> 1]][id[i][j]] = 1,
                           tran.jz[id[i][j >> 1 | 1 << m - 1]][id[i][j]] = 1;
    }
  state.jz[0][id[0][0]] = 1;
  state = state * (tran ^ n);
  int ans(0);
  for (int i(0); i < 1 << m; ++i) (ans += state.jz[0][id[K][i]]) %= 1000000007;
  return printf("%d", ans), 0;
}
