#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<algorithm>
#include<iostream>
#include<fstream>
#include<map>
#include<ctime>
#include<set>
#include<queue>
#include<cmath>
#include<vector>
#include<bitset>
#include<functional>
#define x first
#define y second
#define mp make_pair
#define pb push_back
#define REP(i,l,r) for((i)=(l);(i)<=(r);++(i))
#define REP2(i,l,r) for((i)=(l);(i)!=(r);++(i))
using namespace std;
typedef long long LL;
typedef double ld;
const int MAX=1000000+10;
const int Mod=998244353;
const int alp=3;
int n,S;
int C[MAX];
int dp[MAX];
namespace opt
{
int N;
int a[MAX],b[MAX],w[MAX],tmp[MAX];
int Pow(int a,int b)
{
int k=1;
for(;b;b/=2,a=(LL)a*a%Mod)
if(b%2==1)
k=(LL)k*a % Mod;
return k;
}
void FFT(int *a,int S,int d)
{
if(d==N) return ;
FFT(a,S,d<<1);
FFT(a,S+d,d<<1);
for(int i=S,j=S,p=0;i<N/2;i+=d,j+=d<<1,p+=d)
{
int G=a[j],K=a[j+d];
tmp[i]=((LL)G+(LL)w[p]*K)%Mod;
tmp[i+N/2]=((LL)G+(LL)w[p+N/2]*K)%Mod;
}
for(int i=S;i<N;i+=d)
a[i]=tmp[i];
}
void conv(int *aa,int *bb,int *c,int n)
{
for(int i=0;i<n;++i)
a[i]=aa[i],b[i]=bb[i];
if(n<=500)
{
for(int i=0;i<n*2;++i)
c[i]=0;
for(int i=0;i<n;++i)
for(int j=0;j<n;++j)
c[i+j]=( c[i+j]+(LL)a[i]*b[j] ) % Mod;
for(int i=0;i<n;++i)
a[i]=b[i]=0;
return;
}
N=1;
for(;N<n;N<<=1);
N<<=1;
w[0]=1;
w[1]=Pow(alp, (Mod - 1) / N);
for(int i=2;i<=N;++i)
w[i]=(LL)w[i-1]*w[1]%Mod;
FFT(a,0,1);
FFT(b,0,1);
for(int i=0;i<N;++i)
a[i]=(LL)a[i]*b[i]%Mod;
for(int i=0;i<N;++i)
b[i]=a[i?(N-i):0];
FFT(b,0,1);
int InvN=Pow(N,Mod-2);
for(int i=0;i<N;++i)
{
c[i]=(LL)b[i]*InvN%Mod;
a[i]=b[i]=0;
}
}
}
int a[MAX],b[MAX],c[MAX];
void solve(int l,int r)
{
if(r==l+1)
return;
int mid=(l+r)/2;
solve(l,mid);
int i;
int need=r-l;//(r-1)-l+1
REP2(i,0,need)
a[i]=b[i]=0;
if(need<=l)
{
REP2(i,0,mid-l)
a[i]=dp[i+l];
REP2(i,0,need)
b[i]=dp[i];
opt::conv(a,b,c,need);
REP2(i,0,need)
{
c[i]*=2;
if(c[i]>=Mod)
c[i]-=Mod;
}
}
else
{
REP2(i,0,mid-l)
a[i]=b[i]=dp[i+l];
opt::conv(a,b,c,need);
}
REP2(i,0,need)
{
a[i]=c[i];
b[i]=C[i];
}
opt::conv(a,b,c,need);
REP2(i,mid,r)
{
dp[i]+=c[i-l];
if(dp[i]>=Mod)
dp[i]-=Mod;
}
solve(mid,r);
}
int main()
{
#ifndef ONLINE_JUDGE
freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);
#endif
int i;
scanf("%d%d",&n,&S);
REP(i,1,n)
{
int a;
scanf("%d",&a);
C[a]=1;
}
int N=1;
for(;N<=S;N*=2)
;
dp[0]=1;
solve(0,N);
REP(i,1,S)
printf("%d\n",dp[i]);
return 0;
}
I2luY2x1ZGU8Y3N0ZGlvPgojaW5jbHVkZTxjc3RkbGliPgojaW5jbHVkZTxjc3RyaW5nPgojaW5jbHVkZTxhbGdvcml0aG0+CiNpbmNsdWRlPGlvc3RyZWFtPgojaW5jbHVkZTxmc3RyZWFtPgojaW5jbHVkZTxtYXA+CiNpbmNsdWRlPGN0aW1lPgojaW5jbHVkZTxzZXQ+CiNpbmNsdWRlPHF1ZXVlPgojaW5jbHVkZTxjbWF0aD4KI2luY2x1ZGU8dmVjdG9yPgojaW5jbHVkZTxiaXRzZXQ+CiNpbmNsdWRlPGZ1bmN0aW9uYWw+CiNkZWZpbmUgeCBmaXJzdAojZGVmaW5lIHkgc2Vjb25kCiNkZWZpb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