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>
using namespace std;
const int dr[] = {1, 0, -1, 0, 1, 1, -1, -1};
const int dc[] = {0, 1, 0, -1, 1, -1, -1, 1};
const double eps = 1e-9;
const int INF = 0x7FFFFFFF;
const long long INFLL = 0x7FFFFFFFFFFFFFFFLL;
const double pi = acos(-1);
template <class T>
T take(queue<T> &O) {
  T tmp = O.front();
  O.pop();
  return tmp;
}
template <class T>
T take(stack<T> &O) {
  T tmp = O.top();
  O.pop();
  return tmp;
}
template <class T>
T take(priority_queue<T> &O) {
  T tmp = O.top();
  O.pop();
  return tmp;
}
inline void getint(int &num) { scanf("%d", &num); }
inline void getint(long long &num) { cin >> num; }
int bin[2005];
int arr[2005], n, k, ans[2005];
const long long MOD = 1000000007;
long long modpow(long long a, long long b) {
  a %= MOD;
  if (b) {
    if (b & 1LL)
      return (a * modpow(a * a, b >> 1)) % MOD;
    else
      return modpow(a * a, b >> 1) % MOD;
  } else
    return 1LL;
}
int main() {
  scanf("%d%d", &n, &k);
  for (int(i) = (0), _t = (n); i < (_t); ++(i)) scanf("%d", &arr[i]);
  if (k == 0) {
    for (int(i) = (0), _t = (n); i < (_t); ++(i))
      printf((i) ? " %d" : "%d", arr[i]);
    puts("");
    return 0;
  }
  bin[0] = 1;
  long long a = 0, b = k - 1;
  for (int(i) = (1), _t = (n + 1); i < (_t); ++(i)) {
    ++a;
    ++b;
    bin[i] =
        int(((((long long)bin[i - 1] * b) % MOD) * modpow(a, MOD - 2)) % MOD);
    {};
  }
  for (int(i) = (n - 1), _t = (0); i >= (_t); --(i)) {
    for (int(j) = (i), _t = (0); j >= (_t); --(j)) {
      ans[i] = int(((long long)ans[i] +
                    ((long long)bin[i - j] * (long long)arr[j]) % MOD) %
                   MOD);
    }
  }
  for (int(i) = (0), _t = (n); i < (_t); ++(i))
    printf((i) ? " %d" : "%d", ans[i]);
  puts("");
  return 0;
}
