#include <bits/stdc++.h>
using namespace std;
using ull = unsigned long long;
using ll = long long;
using ii = pair<int, int>;
using vi = vector<int>;
const int md = 1e9 + 7;
int mul() { return 1; }
template <typename Head, typename... Tail>
int mul(Head a, Tail... b) {
  ull c = mul(b...);
  c *= a;
  if (c >= md) c %= md;
  return (int)c;
}
int N, K, M;
int dp[2][13][1 << 4];
int main(int argc, char const *argv[]) {
  cin.sync_with_stdio(0);
  cin.tie(0);
  cin.exceptions(cin.failbit);
  cin >> N >> K >> M;
  fill(dp[0][0], dp[0][0] + (1 << 4), 1);
  for (int n = 1; n <= N; n++) {
    memset(dp[n & 1], 0, sizeof dp[n & 1]);
    fill(dp[n & 1][0], dp[n & 1][0] + (1 << 4), 1);
    for (int k = 1; k <= K; k++) {
      for (int msk = 0; msk < (1 << M); msk++) {
        int &ret = dp[n & 1][k][msk];
        ret += mul(dp[~n & 1][k - 1][msk >> 1 | (1 << (M - 1))],
                   (__builtin_popcount(msk) + 1));
        if (ret >= md) ret -= md;
        ret += dp[~n & 1][k][msk >> 1];
        if (ret >= md) ret -= md;
      }
    }
  }
  cout << dp[N & 1][K][0] << endl;
  return 0;
}
