#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int dp[2][13][1 << 4], m;
int main() {
  int n, k;
  cin >> n >> k >> m;
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < 1 << m; j++) dp[0][0][j] = 1;
    for (int j = 0; j < 1 << m; j++) {
      for (int r = 1; r <= k; r++) {
        int &w = dp[1][r][j] = 0;
        long long c = __builtin_popcount(j) + 1;
        int msk = j << 1;
        if (msk & 1 << m) msk ^= 1 << m;
        w = dp[0][r][msk] + c * dp[0][r - 1][msk | 1] % mod;
        if (w >= mod) w -= mod;
      }
    }
    swap(dp[0], dp[1]);
  }
  cout << dp[0][k][0];
}
