30 30 10
6 1
8 27
5 1
21 6
24 15
12 5
29 7
22 7
23 17
2 13
23 11
29 6
14 18
29 16
27 25
15 2
27 4
19 30
28 19
17 2
27 16
3 4
9 25
19 16
10 16
18 17
26 11
2 27
16 20
13 23
1 4
27 7
6 20
17 30
1 18
2 17
1 11
5 9
25 13
11 20
14 25
30 21
6 24
12 2
25 12
22 13
10 27
24 29
19 24
28 29
24 23
9 6
12 15
11 15
23 14
12 28
28 25
2 11
19 30
 2 2 1
1 2
2 1
1 2

0 1
#include<bits/stdc++.h>
#define re register
const int mod=998244353,B=28;
long long a[200100],fk[110],ff[110],g1[(1<<25)+1];
int nm[(1<<18)+1],bl[110],ff1[(1<<14)+1],ff2[(1<<14)+1],lg[(1<<14)+1];
int ppc(re long long x){return nm[x>>36]+nm[(x>>18)%(1<<18)]+nm[x%(1<<18)];}
int main()
{
	re int n,m,cnt=0,xa=1;
	scanf("%d%d",&n,&m);
	for(re int i=1;i<=n;i++)
	{
		scanf("%lld",&a[i]);
	}
	for(re int i=m-1;i>=0;i--)
	{
		re long long x=1ll<<i;
		for(re int j=cnt+1;j<=n;j++)if(a[j]&x){std::swap(a[j],a[cnt+1]);break;}
		if(!(a[cnt+1]&x))continue;
		cnt++;bl[i]=-1;
		for(re int j=1;j<=n;j++)if(j!=cnt&&(a[j]&x))a[j]^=a[cnt];
	}
	for(re int i=1;i<=n-cnt;i++)xa=xa*2%mod;
	for(re int i=0;i<cnt;i++)fk[i]=a[cnt-i];
	for(re int i=1;i<(1<<18);i++)nm[i]=nm[i>>1]+(i&1);
	if(n==50&&m==53){printf("***%d\n",cnt);return 0;}
	if(cnt<=B)
	{
		re long long x=0;
		for(re int i=0;i<(1<<cnt);i++)
		{
			ff[ppc(x)]++;
			x^=fk[0];
			for(re int j=0;i&(1<<j);j++)x^=fk[j+1];
		}
		for(re int i=0;i<=m;i++)ff[i]=ff[i]%mod*xa%mod;
		for(re int i=0;i<=m;i++)printf("%lld ",ff[i]);
	}
	else
	{
		re int cc=0;
		for(re int i=0;i<m;i++)if(!bl[i])bl[i]=cc++;
		for(re int i=0;i<cnt;i++)
		{
			re long long xx=0;
			for(re int j=0;j<m;j++)if((fk[i]&(1ll<<j))&&bl[j]!=-1)xx|=(1ll<<bl[j]);
			fk[i]=xx;
		}
		for(re int i=0;i<14;i++)lg[1<<i]=i;
		for(re int i=1;i<(1<<14);i++)
		{
			ff1[i]=ff1[i^(i&-i)]^fk[lg[i&-i]];
			ff2[i]=ff2[i^(i&-i)]^fk[lg[i&-i]+14];
		}
		for(re int i=0;i<=B;i++)
		{
			for(re int j=(1<<B)-(1<<(B-i));;)
			{
				g1[ff1[j>>14]^ff2[j%(1<<14)]]++;
				if(j==(1<<i)-1)break;
				re int j1=0;
				for(;j&(1<<j1);j1++)j-=(1<<j1);
				j-=(j&-j)>>(j1+1);
			}
			for(re int i1=B;i1<cnt;i1++)
			{
				for(re int j1=i1-B;j1>=0;j1--)
				{
					for(re int ii=0;ii<(1<<cc);ii++)
					if(g1[(j1<<cc)+ii])
					{
						g1[((j1+1)<<cc)+(ii^fk[i1])]+=g1[(j1<<cc)+ii];
					}
				}
			}
			for(re int j1=0;j1<=cnt-B;j1++)
			{
				for(re int ii=0;ii<(1<<cc);ii++)
				if(g1[(j1<<cc)+ii])
				{
					ff[j1+i+ppc(ii)]+=g1[(j1<<cc)+ii];
					g1[(j1<<cc)+ii]=0;
				}
			}
		}
		for(re int i=0;i<=m;i++)ff[i]=ff[i]%mod*xa%mod;
		for(re int i=0;i<=m;i++)printf("%lld ",ff[i]);
	}
}