You've got an array a, consisting of n integers. The array elements are indexed from 1 to n. Let's determine a two step operation like that:

  1. First we build by the array a an array s of partial sums, consisting of n elements. Element number i (1 ≤ i ≤ n) of array s equals <image>. The operation x mod y means that we take the remainder of the division of number x by number y. 
  2. Then we write the contents of the array s to the array a. Element number i (1 ≤ i ≤ n) of the array s becomes the i-th element of the array a (ai = si). 



You task is to find array a after exactly k described operations are applied.

Input

The first line contains two space-separated integers n and k (1 ≤ n ≤ 2000, 0 ≤ k ≤ 109). The next line contains n space-separated integers a1, a2, ..., an — elements of the array a (0 ≤ ai ≤ 109).

Output

Print n integers — elements of the array a after the operations are applied to it. Print the elements in the order of increasing of their indexes in the array a. Separate the printed numbers by spaces.

Examples

Input

3 1
1 2 3


Output

1 3 6


Input

5 0
3 14 15 92 6


Output

3 14 15 92 6
#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
int IT_MAX = 1 << 21;
const int MOD = 1000000007;
const int INF = 1034567891;
const long long LL_INF = 1234567890123456789ll;
const double PI = 3.141592653589793238;
const double ERR = 1E-10;
long long mul_inv(long long a, long long b = MOD) {
  long long b0 = b, t, q;
  long long x0 = 0, x1 = 1;
  if (b == 1) return 1;
  while (a > 1) {
    q = a / b;
    t = b, b = a % b, a = t;
    t = x0, x0 = x1 - q * x0, x1 = t;
  }
  if (x1 < 0) x1 += b0;
  return x1;
}
long long minv[2050];
long long C(long long a, long long b) {
  b = a - b;
  long long rv = 1, i;
  for (i = a; i > a - b; i--) rv = (rv * i) % MOD;
  for (i = 1; i <= b; i++) rv = (rv * minv[i]) % MOD;
  return rv;
}
long long dp[2050];
long long in[2050];
long long ans[2050];
int main() {
  int N, K, i, j;
  for (i = 1; i <= 2000; i++) minv[i] = mul_inv(i);
  scanf("%d %d", &N, &K);
  for (i = 1; i <= N; i++) scanf("%lld", &in[i]);
  if (K == 0) {
    for (i = 1; i <= N; i++) printf("%lld ", in[i]);
    return !printf("\n");
  }
  K--;
  for (i = 0; i < N; i++) dp[i] = C(K + i, K);
  for (i = 1; i <= N; i++) {
    for (j = i; j <= N; j++) {
      ans[j] += (in[i] * dp[j - i]) % MOD;
      ans[j] %= MOD;
    }
  }
  for (i = 1; i <= N; i++) printf("%lld ", ans[i]);
  return !printf("\n");
}
