Problem: A chainword is a special type of crossword. As most of the crosswords do, it has cells that you put the letters in and some sort of hints to what these letters should be.

The letter cells in a chainword are put in a single row. We will consider chainwords of length m in this task.

A hint to a chainword is a sequence of segments such that the segments don't intersect with each other and cover all m letter cells. Each segment contains a description of the word in the corresponding cells.

The twist is that there are actually two hints: one sequence is the row above the letter cells and the other sequence is the row below the letter cells. When the sequences are different, they provide a way to resolve the ambiguity in the answers.

You are provided with a dictionary of n words, each word consists of lowercase Latin letters. All words are pairwise distinct.

An instance of a chainword is the following triple: 

  * a string of m lowercase Latin letters; 
  * the first hint: a sequence of segments such that the letters that correspond to each segment spell a word from the dictionary; 
  * the second hint: another sequence of segments such that the letters that correspond to each segment spell a word from the dictionary. 



Note that the sequences of segments don't necessarily have to be distinct.

Two instances of chainwords are considered different if they have different strings, different first hints or different second hints.

Count the number of different instances of chainwords. Since the number might be pretty large, output it modulo 998 244 353.

Input

The first line contains two integers n and m (1 ≤ n ≤ 8, 1 ≤ m ≤ 10^9) — the number of words in the dictionary and the number of letter cells.

Each of the next n lines contains a word — a non-empty string of no more than 5 lowercase Latin letters. All words are pairwise distinct. 

Output

Print a single integer — the number of different instances of chainwords of length m for the given dictionary modulo 998 244 353.

Examples

Input


3 5
ababa
ab
a


Output


11


Input


2 4
ab
cd


Output


4


Input


5 100
a
aa
aaa
aaaa
aaaaa


Output


142528942

Note

Here are all the instances of the valid chainwords for the first example: 

<image>

The red lines above the letters denote the segments of the first hint, the blue lines below the letters denote the segments of the second hint.

In the second example the possible strings are: "abab", "abcd", "cdab" and "cdcd". All the hints are segments that cover the first two letters and the last two letters.

Solution (in CPP):

Solution:
#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]);	
}