#include <bits/stdc++.h>
using namespace std;
int main() {
  long N, S;
  cin >> N >> S;
  vector<long> data(S + 1), sub(N + 1);
  data.at(0) = 1;
  long A;
  for (int i = 0; i < N; i++) {
    cin >> A;
    for (int j = S - A; j >= 0; j--) {
      if (data.at(j) != 0) {
        data.at(j + A)++;
      }
    }
    sub.at(i + 1) = data.at(S);
  }
  long ans = 0;
  for (int i = 0; i <= N; i++) {
    for (int j = i + 1; j <= N; j++) {
      ans += sub.at(j) - sub.at(i);
      cout << ans << endl;
      ans %= 998244353;
    }
  }
  cout << ans << endl;
  return 0;
}
