#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10, mod = 1e9 + 7;
int n, k, m, f[N][15][20], ans;
void upd(int& x, int y) {
  x += y;
  x -= x >= mod ? mod : 0;
}
int main() {
  scanf("%d%d%d", &n, &k, &m);
  f[n + 1][0][0] = 1;
  int tmp;
  for (int i = n; i; i--)
    for (int j = (0); j <= (k); j++)
      for (int l = (0); l <= ((1 << m) - 1); l++)
        if (tmp = f[i + 1][j][l]) {
          upd(f[i][j][(l << 1) & ((1 << m) - 1)], tmp);
          upd(f[i][j + 1][(l << 1 | 1) & ((1 << m) - 1)],
              (long long)tmp * (__builtin_popcount(l) + 1) % mod);
        }
  for (int l = (0); l <= ((1 << m) - 1); l++) upd(ans, f[1][k][l]);
  printf("%d\n", ans);
  return 0;
}
