#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
vector<int> mul(vector<int> a, vector<int> b) {
  int n = (int)a.size();
  vector<int> c(n, 0);
  for (int i = 0; i < n; i++) {
    long long tmp = 0;
    for (int j = 0; j <= i; j++) {
      tmp = (tmp + (long long)a[j] * b[i - j]) % MOD;
    }
    c[i] = (int)(tmp % MOD);
  }
  return c;
}
vector<int> pow(vector<int> a, int k) {
  int n = (int)a.size();
  vector<int> b = vector<int>(n, 0);
  b[0] = 1;
  while (k > 0) {
    if (k & 1) b = mul(b, a);
    k >>= 1;
    a = mul(a, a);
  }
  return b;
}
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  vector<int> a(n, 0);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  vector<int> one(n, 1);
  if (k == 0) {
    for (int i = 0; i < n; i++) printf("%d%c", a[i], (i == n - 1) ? '\n' : ' ');
  } else {
    vector<int> b = pow(one, k);
    vector<int> res = mul(b, a);
    for (int i = 0; i < n; i++)
      printf("%d%c", res[i], (i == n - 1) ? '\n' : ' ');
  }
}
