#include<bits/stdc++.h>
#define N 250
#define mod 998244353
using namespace std;
int cnt=1,typ[N],fa[N],ch[N][27],fuck,id[N*N],ek[N*N],n,m,ed[N];

int check(int x,int y){
	while(x!=1&&y!=1){
		if(typ[x]!=typ[y])return 0;
		x=fa[x],y=fa[y];
	}
	return 1;
}
int qmo(int x){
	return x+((x>>31)&mod);
}
struct mat{
	int a[N][N];
}ans,I,o,fuckljx;
mat operator * (mat A,mat B){
//	cout<<"check "<<endl;
	mat c=fuckljx;
	for(int i=1;i<=fuck;i++){
		for(int j=1;j<=fuck;j++){
			for(int k=1;k<=fuck;k++){
				c.a[i][j]=qmo(c.a[i][j]+1ll*A.a[i][k]*B.a[k][j]%mod-mod);
			}
		}
	}
	return c;
}
mat q(mat x,int y){
//	cout<<"fuck "<<fuck<<' '<<y<<endl;
	mat tmp=I,sum=x;
	while(y){
		if(y&1)tmp=tmp*sum;
		sum=sum*sum;
		y>>=1;
	}
	return tmp;
}
void print_mat(mat A){
	for(int i=1;i<=fuck;i++){
		for(int j=1;j<=fuck;j++){
			cout<<A.a[i][j]<<' ';
		}
		cout<<endl;
	}
}
char c[N];
int main(){
//	cout<<"check"<<endl;
	cin>>n>>m;
	for(int i=1;i<=n;i++){
		scanf("%s",c+1);
		int len=strlen(c+1);
		int p=1;
		for(int j=1;j<=len;j++){
			if(!ch[p][c[j]-'a'+1])ch[p][c[j]-'a'+1]=++cnt,fa[cnt]=p,typ[cnt]=c[j]-'a'+1;
			p=ch[p][c[j]-'a'+1];
		}
		ed[p]=1;
	}
	for(int i=1;i<=cnt;i++){
		for(int j=i;j<=cnt;j++){
			if(!check(i,j))continue;
			id[(i-1)*cnt+j]=++fuck;
			ek[fuck]=(i-1)*cnt+j;
//			cout<<"check "<<fuck<<' '<<(i-1)*cnt+j<<endl;
		}
	}
	for(int i=1;i<=fuck;i++){
		int x=(ek[i]-1)/cnt+1,y=(ek[i]-1)%cnt+1;
		for(int w=1;w<=26;w++){
			if(!ch[x][w]||!ch[y][w])continue;
			int nx=ch[x][w],ny=ch[y][w];
			if(nx>ny)swap(nx,ny);
			ans.a[i][id[(nx-1)*cnt+ny]]++;
			if(ed[nx])ans.a[i][id[ny]]++;
			if(ed[ny])ans.a[i][id[nx]]++;
			if(ed[nx]&&ed[ny])ans.a[i][id[1]]++;
		}
	}
//	cout<<"hh"<<endl;
	for(int i=1;i<=fuck;i++)I.a[i][i]=1;
	o.a[1][1]=1;
//	print_mat(o);
//	print_mat(ans);
//	cout<<"check"<<endl;
	printf("%d\n",(o*q(ans,m)).a[1][1]);	
}