#include <bits/stdc++.h>
using namespace std;
const int SIZE = 1E6 + 5;
const int INF = 0x3f3f3f3f;
const long long INFll = 0x3f3f3f3f3f3f3f3f;
const long long fat = 1E9 + 7;
int n;
vector<long long> matMul(vector<long long> a, vector<long long> b) {
  vector<long long> m(n);
  for (int i = 0; i < n; i++) {
    m[i] = 0;
    for (int j = 0; j <= i; j++) {
      m[i] += a[i - j] * b[j];
      m[i] %= fat;
    }
  }
  return m;
};
vector<long long> matPow(vector<long long> resposta, int p) {
  vector<long long> base(n);
  for (int i = 0; i < n; i++) {
    base[i] = 1;
  }
  while (p) {
    if (p & 1) resposta = matMul(resposta, base);
    base = matMul(base, base);
    p >>= 1;
  }
  return resposta;
}
int main() {
  int k;
  scanf("%d %d", &n, &k);
  vector<long long> resposta(n);
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    resposta[i] = x;
  }
  resposta = matPow(resposta, k);
  for (int i = 0; i < n; i++) {
    printf("%lld ", resposta[i]);
  }
  return 0;
}
