#include <bits/stdc++.h>
using namespace std;
long long n, m, K, f[100021][13][16], sz[16];
int main() {
  cin >> n >> K >> m;
  for (int i = 1; i < 1 << m; i++) sz[i] = sz[i >> 1] + (i & 1);
  long long ans = 0;
  f[1][1][1] = 1;
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < K; j++) {
      for (int ns, s = 0; s < (1 << m); s++)
        if (f[i][j][s]) {
          ns = (s << 1) & ((1 << m) - 1);
          f[i + 1][j][ns] = (f[i + 1][j][ns] + f[i][j][s]) % 1000000007ll;
          f[i + 1][j + 1][ns | 1] = (f[i + 1][j + 1][ns | 1] +
                                     f[i][j][s] * (sz[s] + 1) % 1000000007ll) %
                                    1000000007ll;
        }
    }
    long long tmp = 0;
    for (int s = 0; s < (1 << m); s++)
      tmp = (tmp + f[i][K][s] * (n - i + 1)) % 1000000007ll;
    ans = (ans + tmp) % 1000000007ll;
  }
  cout << ans;
  return 0;
}
