This problem is same as the previous one, but has larger constraints.

Aki is playing a new video game. In the video game, he will control Neko, the giant cat, to fly between planets in the Catniverse.

There are n planets in the Catniverse, numbered from 1 to n. At the beginning of the game, Aki chooses the planet where Neko is initially located. Then Aki performs k - 1 moves, where in each move Neko is moved from the current planet x to some other planet y such that:

  * Planet y is not visited yet. 
  * 1 ≤ y ≤ x + m (where m is a fixed constant given in the input) 



This way, Neko will visit exactly k different planets. Two ways of visiting planets are called different if there is some index i such that, the i-th planet visited in the first way is different from the i-th planet visited in the second way.

What is the total number of ways to visit k planets this way? Since the answer can be quite large, print it modulo 10^9 + 7.

Input

The only line contains three integers n, k and m (1 ≤ n ≤ 10^9, 1 ≤ k ≤ min(n, 12), 1 ≤ m ≤ 4) — the number of planets in the Catniverse, the number of planets Neko needs to visit and the said constant m.

Output

Print exactly one integer — the number of different ways Neko can visit exactly k planets. Since the answer can be quite large, print it modulo 10^9 + 7.

Examples

Input


3 3 1


Output


4


Input


4 2 1


Output


9


Input


5 5 4


Output


120


Input


100 1 2


Output


100

Note

In the first example, there are 4 ways Neko can visit all the planets:

  * 1 → 2 → 3 
  * 2 → 3 → 1 
  * 3 → 1 → 2 
  * 3 → 2 → 1 



In the second example, there are 9 ways Neko can visit exactly 2 planets:

  * 1 → 2 
  * 2 → 1 
  * 2 → 3 
  * 3 → 1 
  * 3 → 2 
  * 3 → 4 
  * 4 → 1 
  * 4 → 2 
  * 4 → 3 



In the third example, with m = 4, Neko can visit all the planets in any order, so there are 5! = 120 ways Neko can visit all the planets.

In the fourth example, Neko only visit exactly 1 planet (which is also the planet he initially located), and there are 100 ways to choose the starting planet for Neko.
#include <bits/stdc++.h>
using namespace std;
int n;
int m;
int k;
const long long int MOD2 = 4LL * 1000000007LL * 1000000007LL;
long long int dp[14][1 << 4];
long long int tmp[14][1 << 14];
long long int bt[208][208];
int mxt;
inline int id(int a, int b) {
  mxt = max(mxt, (a << m) + b + 1);
  return (a << m) + b;
}
long long int mat[208][208];
long long int ret[208][208];
int zero_lef[208];
int zero_rig[208];
int zero_lef2[208];
int zero_rig2[208];
int main() {
  cin >> n >> k >> m;
  for (int i2 = n; i2 >= n; i2--) {
    int cnt = 0;
    for (int i = 0; i <= k; i++) {
      for (int j = 0; j < (1 << m); j++) {
        int ava = 0;
        for (int k = 0; k < m; k++) {
          if ((j >> k) & 1) {
            ava++;
          }
        }
        ava++;
        int wa = ((j << 1) & ((1 << m) - 1));
        bt[id(i, wa)][id(i, j)] = 1;
        wa++;
        if (i + 1 <= k) {
          bt[id(i + 1, wa)][id(i, j)] = ava;
        }
      }
    }
  }
  for (int i = 0; i < mxt; i++) mat[i][i] = 1, zero_lef[i] = zero_rig[i] = i;
  for (int i = 0; i < mxt; i++) zero_lef2[i] = 0, zero_rig2[i] = mxt - 1;
  int N = n;
  n = mxt;
  while (N) {
    if ((N & 1LL)) {
      for (int i = 0; i < n; i++)
        for (int j = 0; j < n; j++) ret[i][j] = 0;
      for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
          for (int k = zero_lef[i]; k <= zero_rig[i]; k++) {
            ret[i][j] += mat[i][k] * bt[k][j];
            if (ret[i][j] >= MOD2) ret[i][j] -= MOD2;
          }
        }
      }
      for (int i = 0; i < n; i++) zero_lef[i] = INT_MAX, zero_rig[i] = INT_MIN;
      for (int i = 0; i < n; i++)
        for (int j = 0; j < n; j++) {
          mat[i][j] = ret[i][j];
          if (mat[i][j] >= 1000000007LL) mat[i][j] %= 1000000007LL;
          if (mat[i][j]) {
            zero_lef[i] = min(zero_lef[i], j);
            zero_rig[i] = max(zero_rig[i], j);
          }
        }
    }
    N >>= 1LL;
    if (N == 0) break;
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++) ret[i][j] = 0;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        for (int k = zero_lef2[i]; k <= zero_rig2[i]; k++) {
          ret[i][j] += bt[i][k] * bt[k][j];
          if (ret[i][j] >= MOD2) ret[i][j] -= MOD2;
        }
      }
    }
    for (int i = 0; i < n; i++) zero_lef2[i] = INT_MAX, zero_rig2[i] = INT_MIN;
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++) {
        bt[i][j] = ret[i][j];
        if (bt[i][j] >= 1000000007LL) bt[i][j] %= 1000000007LL;
        if (bt[i][j]) {
          zero_lef2[i] = min(zero_lef2[i], j);
          zero_rig2[i] = max(zero_rig2[i], j);
        }
      }
  }
  long long int ans = 0;
  for (int j = 0; j < (1 << m); j++) {
    ans += mat[id(k, j)][0];
    if (ans >= MOD2) ans -= MOD2;
  }
  ans %= 1000000007LL;
  printf("%lld\n", ans);
  return 0;
}
