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 inf = 1 << 30;
const long long infl = 1LL << 60;
char buf[1000000];
string nextLine() {
  scanf("%[^\n]", buf);
  scanf("%*c");
  return string(buf);
}
string next() {
  scanf("%s", buf);
  return string(buf);
}
int nextInt() {
  int tmp;
  scanf("%d", &tmp);
  return tmp;
}
const int MAXN = 2100;
int chooses[MAXN];
int inverses[MAXN];
int K;
int N;
const long long MOD = 1E9 + 7;
pair<int, pair<int, int> > extendedEuclid(int a, int b) {
  int x = 1, y = 0;
  int xLast = 0, yLast = 1;
  int q, r, m, n;
  while (a != 0) {
    q = b / a;
    r = b % a;
    m = xLast - q * x;
    n = yLast - q * y;
    xLast = x, yLast = y;
    x = m, y = n;
    b = a, a = r;
  }
  return make_pair(b, make_pair(xLast, yLast));
}
int modInverse(int a) {
  int m = MOD;
  return (extendedEuclid(a, m).second.first + m) % m;
}
long long times(long long a, long long b) { return (a * b) % MOD; }
long long divide(long long a, long long b) { return times(a, inverses[b]); }
long long add(long long a, long long b) { return (a + b) % MOD; }
void prec() {
  for (int i = 0, _i = (N + 1); i < _i; ++i) {
    inverses[i] = modInverse(i);
  }
  long long c = 1;
  int mult = K;
  for (int i = 0, _i = (N + 1); i < _i; ++i) {
    chooses[i] = c;
    c = times(c, mult);
    c = divide(c, i + 1);
    mult--;
  }
}
int sums[MAXN][MAXN];
int main() {
  N = nextInt();
  K = nextInt();
  prec();
  for (int i = 0, _i = (N); i < _i; ++i) {
    sums[0][i] = nextInt();
  }
  for (int i = (1), _i = (N); i < _i; ++i) {
    sums[i][0] = sums[i - 1][0];
    for (int j = (1), _j = (N); j < _j; ++j) {
      sums[i][j] = add(sums[i][j - 1], sums[i - 1][j]);
    }
  }
  string sep;
  for (int i = 0, _i = (N); i < _i; ++i) {
    int x = 0;
    int y = i;
    long long guy = 0;
    for (int k = 0, _k = (i + 1); k < _k; ++k) {
      guy = add(guy, times(chooses[k], sums[x][y]));
      x++;
      y--;
    }
    cout << sep << guy;
    sep = " ";
  }
  cout << "\n";
}
