#include <bits/stdc++.h>
using ll = long long;
const int M = 998244353, C = 300001;
inline ll pow(ll a, ll b, ll M) {
  if (b == 0) return 1;
  ll c = 1;
  while (b > 0) {
    if (b % 2 == 1) c = (c * a) % M;
    b /= 2;
    a = (a * a) % M;
  }
  return c;
}
void butterfly(int n, int dp[]) {
  int m = n / 2, i, curcon = 1, j;
  dp[0] = 0;
  for (j = 1; j < n;) {
    for (i = 0; i < curcon; i++, j++) dp[j] = dp[j - curcon] + m;
    curcon *= 2, m /= 2;
  }
}
ll ntt_tmp[C];
int bt_dp[C];
void dft(ll poly[], int n, ll w[], ll M, ll res[]) {
  int i, d, cur, beg, tzar, md;
  ll nw;
  butterfly(n, bt_dp);
  for (i = 0; i < n; i++) res[i] = poly[bt_dp[i]];
  for (cur = 2, d = 1; cur <= n; cur *= 2, d++) {
    for (beg = 0; beg < n; beg += cur) {
      nw = 1;
      tzar = cur / 2;
      for (i = 0; i < cur; i++) {
        md = (i >= tzar ? i - tzar : i);
        ntt_tmp[beg + i] = (res[beg + md] + nw * res[beg + tzar + md]) % M;
        nw = (nw * w[d]) % M;
      }
    }
    for (i = 0; i < n; i++) res[i] = ntt_tmp[i];
  }
}
const int D = 21;
ll res1[C], res2[C], full_mul[C], w[D], iw[D], post_a[C], post_b[C];
void ntt_full(ll a[], int n, ll b[], int m, ll M, ll finale[]) {
  int i = 1, mn = n + m, close = 0, p0 = 1;
  for (i = 1;; i <<= 1) {
    if ((i ^ mn) == 0) break;
    if ((i ^ mn) < mn) mn ^= i, close = 1;
    p0++;
  }
  if (close == 1) mn <<= 1, p0++;
  ll inn = pow(mn, M - 2, M);
  ll root = 3;
  ll w0 = pow(root, 17 * 7 * (1 << (23 - p0)), M);
  w[p0] = w0;
  iw[p0] = pow(w0, M - 2, M);
  for (i = p0 - 1; i >= 0; i--) w[i] = (w[i + 1] * w[i + 1]) % M;
  for (i = p0 - 1; i >= 0; i--) iw[i] = (iw[i + 1] * iw[i + 1]) % M;
  for (i = 0; i < n; i++) post_a[i] = a[i];
  for (i = n; i < mn; i++) post_a[i] = 0;
  for (i = 0; i < m; i++) post_b[i] = b[i];
  for (i = m; i < mn; i++) post_b[i] = 0;
  dft(post_a, mn, w, M, res1);
  dft(post_b, mn, w, M, res2);
  for (i = 0; i < mn; i++) full_mul[i] = (res1[i] * res2[i]) % M;
  dft(full_mul, mn, iw, M, finale);
  for (i = 0; i < mn; i++) finale[i] = (finale[i] * inn) % M;
}
void purge(ll t1[], ll t2[], int i, int pi, ll aim[], ll curr[], int M,
           int double_size = 1) {
  int pi2 = (1 + double_size) * pi;
  int j, ln = pi + pi2, sub_ln = 2 * pi - 1, base = pi - 1;
  ntt_full(t1, pi2, t2, pi, M, curr);
  for (j = base; j < sub_ln; j++)
    aim[i + j - base] = (aim[i + j - base] + curr[j]) % M;
  for (j = 0; j < ln; j++) curr[j] = 0;
}
ll summa[C], dp[C], c[C], post_poly[C];
int powers[C];
int main() {
  int i, j, n, m, pi, si;
  ll a;
  scanf("%d %d", &n, &m);
  for (i = 0; i < n; i++) scanf("%lld", &a), c[a] = 1;
  summa[0] = 1, dp[0] = 1;
  for (i = 1; i < C; i <<= 1) {
    for (j = i; j < C; j += i) powers[j] = i;
  }
  for (i = 1; i <= m; i++) {
    pi = powers[i];
    if (i == pi) {
      purge(c + 1, summa + i - pi, i, pi, dp, post_poly, M, 0);
    }
    if (i != powers[i]) {
      purge(summa, c + 1 + i - pi, i, pi, dp, post_poly, M);
      purge(c + 1, summa + i - pi, i, pi, dp, post_poly, M);
    }
    pi = powers[i + 1];
    if (i == pi - 1) {
      purge(dp, dp + i - pi + 1, i, pi, summa, post_poly, M, 0);
    } else {
      purge(dp, dp + i - pi + 1, i, pi, summa, post_poly, M);
      purge(dp, dp + i - pi + 1, i, pi, summa, post_poly, M);
    }
    printf("%lld\n", dp[i]);
  }
  return 0;
}
