Problem: Our child likes computer science very much, especially he likes binary trees.

Consider the sequence of n distinct positive integers: c1, c2, ..., cn. The child calls a vertex-weighted rooted binary tree good if and only if for every vertex v, the weight of v is in the set {c1, c2, ..., cn}. Also our child thinks that the weight of a vertex-weighted tree is the sum of all vertices' weights.

Given an integer m, can you for all s (1 ≤ s ≤ m) calculate the number of good vertex-weighted rooted binary trees with weight s? Please, check the samples for better understanding what trees are considered different.

We only want to know the answer modulo 998244353 (7 × 17 × 223 + 1, a prime number).

Input

The first line contains two integers n, m (1 ≤ n ≤ 105; 1 ≤ m ≤ 105). The second line contains n space-separated pairwise distinct integers c1, c2, ..., cn. (1 ≤ ci ≤ 105).

Output

Print m lines, each line containing a single integer. The i-th line must contain the number of good vertex-weighted rooted binary trees whose weight exactly equal to i. Print the answers modulo 998244353 (7 × 17 × 223 + 1, a prime number).

Examples

Input

2 3
1 2


Output

1
3
9


Input

3 10
9 4 3


Output

0
0
1
1
0
2
4
2
6
15


Input

5 10
13 10 6 4 15


Output

0
0
0
1
0
1
0
2
0
5

Note

In the first example, there are 9 good vertex-weighted rooted binary trees whose weight exactly equal to 3:

<image>

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 7, p = 998244353;
long long s[N][2];
vector<int> va, vb;
int n, m, k, lim, r[N], f[N], v[N], e[N], t[N], q[N], w[N], rev[N];
inline int read() {
  int num = 0;
  char g = getchar();
  while (g < 48 || 57 < g) g = getchar();
  while (47 < g && g < 58)
    num = (num << 1) + (num << 3) + g - 48, g = getchar();
  return num;
}
inline long long pows(long long u, int v) {
  long long ans = 1;
  while (v > 0) {
    if (v & 1) ans = ans * u % p;
    u = u * u % p, v = v >> 1;
  }
  return ans;
}
inline void init() {
  for (int i = 1; i < 1e6; i = i << 1) {
    long long a = pows(3, (p - 1) / (i << 1)),
              b = pows((p + 1) / 3, (p - 1) / (i << 1)), wa = 1, wb = 1;
    for (int j = 0; j < i; j++, wa = wa * a % p, wb = wb * b % p)
      s[i + j][0] = wa, s[i + j][1] = wb;
  }
}
inline void NTT(vector<int> &v) {
  for (int i = 0; i < lim; i++)
    if (i < rev[i]) swap(v[i], v[rev[i]]);
  for (int mid = 1; mid < lim; mid = mid << 1)
    for (int i = 0, r = mid << 1; i < lim; i += r)
      for (int j = 0; j < mid; j++) {
        long long a = v[i + j], b = v[i + j + mid] * s[mid + j][0] % p;
        v[i + j] = a + b, v[i + j + mid] = a - b + p;
        if (v[i + j] >= p) v[i + j] -= p;
        if (v[i + j + mid] >= p) v[i + j + mid] -= p;
      }
}
inline void INTT(vector<int> &v) {
  for (int i = 0; i < lim; i++)
    if (i < rev[i]) swap(v[i], v[rev[i]]);
  for (int mid = 1; mid < lim; mid = mid << 1)
    for (int i = 0, r = mid << 1; i < lim; i += r)
      for (int j = 0; j < mid; j++) {
        long long a = v[i + j], b = v[i + j + mid] * s[mid + j][1] % p;
        v[i + j] = a + b, v[i + j + mid] = a - b + p;
        if (v[i + j] >= p) v[i + j] -= p;
        if (v[i + j + mid] >= p) v[i + j + mid] -= p;
      }
  long long inv = pows(lim, p - 2);
  for (int i = 0; i < lim; i++) v[i] = v[i] * inv % p;
}
inline void NTT(int *s, int t) {
  for (int i = 0; i < lim; i++)
    if (r[i] > i) swap(s[i], s[r[i]]);
  for (int mid = 1; mid < lim; mid = mid << 1) {
    long long w = pows(t, (p - 1) / (mid << 1));
    for (int i = 0, r = mid << 1; i < lim; i += r) {
      long long wn = 1;
      for (int j = 0; j < mid; j++, wn = w * wn % p) {
        long long a = s[i + j], b = s[i + j + mid] * wn % p;
        s[i + j] = a + b, s[i + j + mid] = a - b + p;
        if (s[i + j] >= p) s[i + j] -= p;
        if (s[i + j + mid] >= p) s[i + j + mid] -= p;
      }
    }
  }
  if (t + t + t == p + 1) {
    long long invs = pows(lim, p - 2);
    for (int i = 0; i < lim; i++) s[i] = s[i] * invs % p;
  }
}
inline void getans(int l, int r) {
  if (l == r) {
    if (l == 0)
      t[0] = 1;
    else
      t[l] = q[l - 1] * pows(l, p - 2) % p;
    return;
  }
  int d = (l + r) >> 1, len = d - l + 1;
  getans(l, d);
  lim = 1, k = 0;
  while (lim <= len * 3) lim = lim << 1, k++;
  va.resize(lim), vb.resize(lim);
  for (int i = 0; i < lim; i++)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (k - 1)), va[i] = vb[i] = 0;
  for (int i = l; i <= d; i++) va[i - l] = t[i];
  for (int i = 0; i <= len * 2; i++) vb[i] = v[i];
  NTT(va), NTT(vb);
  for (int i = 0; i < lim; i++) va[i] = 1ll * va[i] * vb[i] % p;
  INTT(va);
  for (int i = d; i < r; i++) q[i] = (q[i] + va[i - l]) % p;
  getans(d + 1, r);
}
inline void inv(int *a, int *b, int u) {
  if (u == 1) {
    b[0] = pows(a[0], p - 2);
    return;
  }
  inv(a, b, u >> 1);
  lim = 1, k = 0;
  while (lim <= u + u) lim = lim << 1, k++;
  for (int i = 0; i < lim; i++) r[i] = (r[i >> 1] >> 1) | ((i & 1) << (k - 1));
  for (int i = 0; i < u; i++) f[i] = a[i], e[i] = b[i];
  for (int i = u; i < lim; i++) f[i] = e[i] = 0;
  NTT(f, 3), NTT(e, 3);
  for (int i = 0; i < lim; i++) f[i] = 1ll * f[i] * e[i] % p * e[i] % p;
  NTT(f, (p + 1) / 3);
  for (int i = 0; i < u; i++) b[i] = (2ll * b[i] - f[i] + p) % p;
}
inline void getln(int *a, int *b, int len) {
  int z = 1;
  while (z < len) z = z << 1;
  inv(a, b, z);
  lim = 1, k = 0;
  while (lim <= len + len) lim = lim << 1, k++;
  for (int i = 0; i < lim; i++) r[i] = (r[i >> 1] >> 1) | ((i & 1) << (k - 1));
  for (int i = len; i < lim; i++) b[i] = e[i] = 0;
  for (int i = 0; i < len; i++) e[i] = 1ll * a[i + 1] * (i + 1) % p;
  NTT(b, 3), NTT(e, 3);
  for (int i = 0; i < lim; i++) b[i] = 1ll * b[i] * e[i] % p;
  NTT(b, (p + 1) / 3);
  for (int i = len - 1; i > 0; i--) b[i] = 1ll * b[i - 1] * pows(i, p - 2) % p;
  b[0] = 0;
}
vector<int> h;
inline void getinv(int u, vector<int> &e, vector<int> &g, vector<int> &f) {
  if (u == 1) {
    e[0] = pows(f[0], p - 2);
    return;
  }
  getinv((u + 1) / 2, g, e, f);
  lim = 1, k = 0;
  while (lim < u + u) lim = lim << 1, k++;
  for (int i = 0; i < lim; i++)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (k - 1));
  for (int i = 0; i < (u + 1) / 2; i++) e[i] = (g[i] << 1);
  for (int i = (u + 1) / 2; i < lim; i++) e[i] = 0;
  for (int i = 0; i < u; i++) h[i] = f[i];
  for (int i = u; i < lim; i++) h[i] = 0;
  NTT(g), NTT(h);
  for (int i = 0; i < lim; i++) h[i] = 1ll * h[i] * g[i] % p * g[i] % p;
  INTT(h);
  for (int i = 0; i < u; i++) {
    e[i] = e[i] - h[i] + p;
    if (e[i] >= p) e[i] -= p;
  }
  for (int i = u; i < lim; i++) e[i] = 0;
}
int main() {
  init(), m = read(), n = read() + 3;
  for (int i = 1; i <= m; i++) w[read()] = p - 4;
  w[0] = 1;
  getln(w, q, n);
  for (int i = 1; i <= n; i++) v[i - 1] = 1ll * q[i] * i % p * (p + 1) / 2 % p;
  memset(q, 0, sizeof(q));
  getans(0, n);
  t[0]++;
  memset(q, 0, sizeof(q));
  vector<int> a, b, c;
  a.resize(1e6), b.resize(1e6), c.resize(1e6), h.resize(1e6);
  for (int i = 0; i <= n; i++) a[i] = t[i];
  getinv(n, b, c, a);
  for (int i = 1; i < n - 2; i++) printf("%d\n", b[i] * 2 % p);
  return 0;
}