#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
bool chkmin(T1 &x, T2 y) {
  return y < x ? (x = y, true) : false;
}
template <typename T1, typename T2>
bool chkmax(T1 &x, T2 y) {
  return y > x ? (x = y, true) : false;
}
const int N = 100005;
int n, k, m;
const int MOD = (int)1e9 + 7;
inline int add(int x, int y) {
  x += y;
  if (x >= MOD) x -= MOD;
  return x;
}
inline void vadd(int &x, int y) {
  x += y;
  if (x >= MOD) x -= MOD;
}
inline int sub(int x, int y) {
  x -= y;
  if (x < 0) x += MOD;
  return x;
}
inline int mult(int x, int y) { return x * (long long)y % MOD; }
int dp[N][1 << 4][13];
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k >> m;
  dp[n][0][0] = 1;
  for (int i = n; i >= 1; --i) {
    for (int mask = 0; mask < (1 << m); ++mask) {
      for (int d = 0; d <= k; ++d) {
        vadd(dp[i - 1][((mask << 1) & ((1 << m) - 1))][d], dp[i][mask][d]);
        if (d < k)
          vadd(dp[i - 1][((mask << 1) & ((1 << m) - 1)) | 1][d + 1],
               mult(__builtin_popcount(mask) + 1, dp[i][mask][d]));
      }
    }
  }
  int ans = 0;
  for (int mask = 0; mask < (1 << m); ++mask) vadd(ans, dp[0][mask][k]);
  cout << ans << '\n';
  return 0;
}
