#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
vector<long long> product(const vector<long long>& x,
                          const vector<long long>& y) {
  int n = x.size();
  vector<long long> ret(n, 0);
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j <= i; ++j) {
      ret[i] += x[i - j] * y[j];
      ret[i] %= MOD;
    }
  }
  return ret;
}
int main() {
  int n, k;
  cin >> n >> k;
  vector<long long> a(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  vector<long long> x(n, 1);
  vector<long long> y(n, 0);
  y[0] = 1;
  vector<long long> z = x;
  while (k > 0) {
    if (k & 1) y = product(y, z);
    z = product(z, z);
    k >>= 1;
  }
  vector<long long> ret(n);
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j <= i; ++j) {
      ret[i] += y[i - j] * a[j];
      ret[i] %= MOD;
    }
  }
  cout << ret[0];
  for (int i = 1; i < n; ++i) cout << ' ' << ret[i];
  cout << endl;
  return 0;
}
