#include <bits/stdc++.h>
using namespace std;
long long int t[2001];
long long int c[2001] = {0};
void multiply(long long int a[], long long int b[], long long int n) {
  memset(c, 0, sizeof(c));
  for (int i = 0; i < n; i++) {
    for (int j = 0; i < n; j++) {
      if (j > i) break;
      c[i] += a[i - j] * b[j];
      c[i] %= 1000000007;
    }
  }
  for (int i = 0; i < n; i++) a[i] = c[i];
}
void rec(long long int b[], long long int k, long long int n) {
  if (k <= 1) return;
  rec(b, k / 2, n);
  multiply(b, b, n);
  if (k & 1) multiply(b, t, n);
}
int main() {
  long long int n, k;
  cin >> n >> k;
  long long int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  long long int b[n];
  for (int i = 0; i < n; i++) {
    b[i] = 1;
    t[i] = 1;
  }
  if (k == 0) {
    for (int i = 0; i < n; i++) cout << a[i] % 1000000007 << " ";
    return 0;
  }
  rec(b, k, n);
  multiply(b, a, n);
  for (int i = 0; i < n; i++) cout << b[i] % 1000000007 << " ";
}
