#include <bits/stdc++.h>
using namespace std;
int main() {
  long long dp[109][100009];
  long long n, k, mod = 1000000007LL;
  cin >> n >> k;
  vector<long long> a(n);
  for (int i = (0); i < (n); i++) cin >> a[i];
  memset(dp, 0LL, sizeof dp);
  for (int i = (0); i < (n); i++) dp[i][0] = 1;
  for (int i = (0); i < (a[0] + 1); i++) dp[0][i] = 1;
  for (int i = (1); i < (n); i++) {
    for (int j = (1); j < (100009); j++) {
      dp[i][j] = (dp[i][j - 1] % mod + dp[i - 1][j] % mod) % mod;
      if (j - a[i] - 1 >= 0)
        dp[i][j] = ((dp[i][j] - dp[i - 1][j - a[i] - 1]) % mod + mod) % mod;
    }
  }
  for (int i = (0); i < (n); i++) {
    for (int j = (0); j < (10); j++) {
      cout << dp[i][j] << " ";
    }
    cout << endl;
  }
  cout << dp[n - 1][k] << endl;
  return 0;
}
