#include <bits/stdc++.h>
using namespace std;
void add(int &x, int y) {
  x += y;
  if (x >= 1000000007) x -= 1000000007;
}
inline int read() {
  int x = 0;
  bool t = false;
  char ch = getchar();
  while ((ch < '0' || ch > '9') && ch != '-') ch = getchar();
  if (ch == '-') t = true, ch = getchar();
  while (ch <= '9' && ch >= '0') x = x * 10 + ch - 48, ch = getchar();
  return t ? -x : x;
}
int f[100100][13][1 << 4];
int bel[1 << 4];
int n, K, m;
int main() {
  n = read();
  K = read();
  m = read();
  f[0][0][0] = 1;
  for (int i = 1; i < 1 << m; ++i) bel[i] = bel[i >> 1] + (i & 1);
  for (int i = 1; i <= n; ++i)
    for (int j = 0; j <= K; ++j)
      for (int S = 0; S < 1 << m; ++S) {
        if (!f[i - 1][j][S]) continue;
        int T = (S << 1) & ((1 << m) - 1);
        add(f[i][j][T], f[i - 1][j][S]);
        if (j < K)
          add(f[i][j + 1][T | 1],
              1ll * f[i - 1][j][S] * (bel[S] + 1) % 1000000007);
      }
  int ans = 0;
  for (int i = 0; i < 1 << m; ++i) add(ans, f[n][K][i]);
  printf("%d\n", ans);
  return 0;
}
