#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
long long dp[100005][15][20];
int main() {
  int n, m, k, j, p, i, mask, nr;
  long long sol = 0;
  cin >> n >> k >> m;
  dp[0][0][0] = 1;
  for (i = 0; i < n; i++) {
    for (j = 0; j <= k; j++) {
      for (p = 0; p < (1 << m); p++) {
        mask = (p << 1) % (1 << m);
        dp[i + 1][j][mask] = (dp[i + 1][j][mask] + dp[i][j][p]) % MOD;
        if (j < k) {
          nr = __builtin_popcount(p) + 1;
          dp[i + 1][j + 1][mask | 1] =
              (dp[i + 1][j + 1][mask | 1] + dp[i][j][p] * nr) % MOD;
        }
      }
    }
  }
  for (i = 0; i < (1 << m); i++) sol = (sol + dp[n][k][i]) % MOD;
  cout << sol;
}
