#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define pre(i,a,b) for(int i=a;i>=b;i--)
#define N 170 
#define P 998244353
using namespace std;
int n,m,ch[N][26],mat[N][N],idx,ed[N],tot,v[N][N],u[N],ans;char s[N];
struct M{
	int a[N][N];
	M(){memset(a,0,sizeof(a));}
	M operator*(const M o)const{
		M now;
		rep(i,1,tot)rep(j,1,tot)rep(k,1,tot)
			now.a[i][j]=(now.a[i][j]+1LL*a[i][k]*o.a[k][j])%P;
		return now;
	}
	M operator^(int y){
		M now,x=*this;
		rep(i,1,tot)now.a[i][i]=1;
		for(;y;y>>=1,x=x*x)if(y&1)now=now*x;
		return now;
	}
}w;
int dfs(int x,int y){
	if(x>y)swap(x,y);
	if(mat[x][y])return mat[x][y];
	mat[x][y]=++tot;
	rep(i,0,25)if(ch[x][i]&&ch[y][i])w.a[mat[x][y]][dfs(ch[x][i],ch[y][i])]++;
	if(ed[x]){
		rep(i,0,25)if(ch[0][i]&&ch[y][i])w.a[mat[x][y]][dfs(ch[0][i],ch[y][i])]++;
		if(ed[y]){
			rep(i,0,25)if(ch[0][i])w.a[mat[x][y]][dfs(ch[0][i],ch[0][i])]++;
			u[mat[x][y]]=1;
		}
	}
	if(ed[y]){
		rep(i,0,25)if(ch[x][i]&&ch[0][i])w.a[mat[x][y]][dfs(ch[x][i],ch[0][i])]++;
	}
	return mat[x][y];
}
int main(){
	scanf("%d%d",&n,&m);
	rep(i,1,n){
		scanf("%s",s+1);
		int len=strlen(s+1),cur=0;
		rep(j,1,len){
			if(!ch[cur][s[j]-'a'])ch[cur][s[j]-'a']=++idx;
			cur=ch[cur][s[j]-'a'];
		}
		ed[cur]=1;
	}
	dfs(0,0);w=w^m;
	rep(i,1,tot)if(u[i])ans=(ans+w.a[1][i])%P;
	printf("%d\n",ans);
	return 0;
}
