#include <bits/stdc++.h>
using namespace std;
const int N = 100 * 1000;
const int K = 12;
const int M = 4;
const int MOD = 1000 * 1000 * 1000 + 7;
int n, k, m;
int dp[N + 1][K + 1][1 << M];
int add(int a, int b) { return a + b < MOD ? a + b : a + b - MOD; }
int mul(int a, int b) { return 1ll * a * b % MOD; }
int set_bit(int a, int i) { return a |= (1 << i); }
int clear_bit(int a, int i) { return a &= ~(1 << i); }
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n >> k >> m;
  dp[0][0][0] = 1;
  for (int i = 0; i < n; ++i)
    for (int j = 0; j <= k; ++j)
      for (int b = 0; b < 1 << m; ++b) {
        int b2 = clear_bit(b << 1, m);
        if (j < k)
          dp[i + 1][j + 1][set_bit(b2, 0)] =
              add(dp[i + 1][j + 1][set_bit(b2, 0)],
                  mul(dp[i][j][b], __builtin_popcount(b) + 1));
        dp[i + 1][j][b2] = add(dp[i + 1][j][b2], dp[i][j][b]);
      }
  int ans = 0;
  for (int i = 0; i < 1 << m; ++i) ans = add(ans, dp[n][k][i]);
  cout << ans << '\n';
  return 0;
}
