#include <bits/stdc++.h>
using namespace std;
long long int Ones(long long int mask) {
  long long int cnt = 0;
  while (mask > 0) {
    if (mask & 1) cnt++;
    mask >>= 1;
  }
  cnt += 1;
  return cnt;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int mod = 1E9 + 7;
  long long int n, k, m;
  cin >> n >> k >> m;
  long long int dp[n + 1][k + 1][1 << m];
  for (long long int i = 0; i <= n; i++)
    for (long long int j = 0; j <= k; j++)
      for (long long int mask = 0; mask < (1 << m); mask++) dp[i][j][mask] = 0;
  dp[0][0][0] = 1;
  for (long long int i = 0; i < n; i++) {
    for (long long int j = 0; j <= k; j++) {
      for (long long int mask = 0; mask < (1 << m); mask++) {
        long long int nwmask = (mask << 1) % (1 << m);
        dp[i + 1][j][nwmask] = (dp[i + 1][j][nwmask] + dp[i][j][mask]) % mod;
        nwmask |= 1;
        if (j < k) {
          long long int cnt = Ones(mask);
          dp[i + 1][j + 1][nwmask] =
              (dp[i + 1][j + 1][nwmask] + (cnt * dp[i][j][mask]) % mod) % mod;
        }
      }
    }
  }
  long long int ans = 0;
  for (long long int mask = 0; mask < (1 << m); mask++)
    ans = (ans + dp[n][k][mask]) % mod;
  cout << ans << endl;
  return 0;
}
