#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int f[2][15][20], ans;
inline int read() {
  int x = 0;
  char ch = getchar();
  while (!isdigit(ch)) ch = getchar();
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x;
}
inline void Add(int &x, int y) { x += y, x >= MOD && (x -= MOD); }
int main() {
  int n = read(), k = read(), m = read();
  int lim = (1 << m) - 1;
  f[1][0][0] = 1;
  for (int i = 1; i <= n; i++) {
    int now = i & 1, nxt = now ^ 1;
    memset(f[nxt], 0, sizeof(f[nxt]));
    for (int j = 0; j <= k; j++) {
      for (int s = 0; s <= lim; s++) {
        int to = (s << 1) & lim;
        Add(f[nxt][j][to], f[now][j][s]);
        Add(f[nxt][j + 1][to | 1], f[now][j][s]);
        f[nxt][j + 1][to | 1] = (f[nxt][j + 1][to | 1] +
                                 1ll * f[now][j][s] * __builtin_popcount(s)) %
                                MOD;
      }
    }
  }
  int cur = (n & 1) ^ 1;
  for (int s = 0; s <= lim; s++) Add(ans, f[cur][k][s]);
  printf("%d\n", ans);
  return 0;
}
