#include <bits/stdc++.h>
using namespace std;
const int P = 1000 * 1000 * 1000 + 7;
const int MAX_N = 2000 + 10;
int arr[MAX_N] = {1}, a[MAX_N];
int tmp[MAX_N];
void buildArr(int n, int k) {
  if (k == 0) return;
  buildArr(n, k / 2), memset(tmp, 0, sizeof tmp);
  for (int i = 0; i < n; i++)
    for (int j = 0; i + j < n; j++)
      (tmp[i + j] += 1LL * arr[i] * arr[j] % P) %= P;
  for (int i = 0; i < n; i++) arr[i] = tmp[i];
  if (k & 1)
    for (int i = 1; i < n; i++) (arr[i] += arr[i - 1]) %= P;
}
int main() {
  ios_base ::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < n; i++) cin >> a[i];
  buildArr(n, k);
  for (int i = 0; i < n; i++) {
    int num = 0;
    for (int j = 0; j <= i; j++) (num += 1LL * arr[i - j] * a[j] % P) %= P;
    cout << num << ' ';
  }
  return 0;
}
