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>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef double db;
typedef pair <int,int> Pii;
#define reg register
#define mp make_pair
#define pb push_back
#define Mod1(x) ((x>=P)&&(x-=P))
#define Mod2(x) ((x<0)&&(x+=P))
#define rep(i,a,b) for(int i=a,i##end=b;i<=i##end;++i)
#define drep(i,a,b) for(int i=a,i##end=b;i>=i##end;--i)
template <class T> inline void cmin(T &a,T b){ ((a>b)&&(a=b)); }
template <class T> inline void cmax(T &a,T b){ ((a<b)&&(a=b)); }

char IO;
template <class T=int> T rd(){
	T s=0; int f=0;
	while(!isdigit(IO=getchar())) f|=IO=='-';
	do s=(s<<1)+(s<<3)+(IO^'0');
	while(isdigit(IO=getchar()));
	return f?-s:s;
}

const int N=250,P=998244353;

int n,m;
char s[N];
int nxt[N][26],cnt,End[N];
string str[N];

int mk[N];
int stx[N],sty[N],stcnt;
int id[N][N];
struct Mat{
	int a[N][N];
	void clear(){ rep(i,1,stcnt) rep(j,1,stcnt) a[i][j]=0; }
	Mat operator * (const Mat x) const {
		Mat res; res.clear();
		rep(i,1,stcnt) rep(j,1,stcnt) if(a[i][j]) rep(k,1,stcnt) res.a[i][k]=(res.a[i][k]+1ll*a[i][j]*x.a[j][k])%P;
		return res;
	}
} x;

Mat qpow(Mat x,int k){
	Mat res=x;
	for(k--;k;k>>=1,x=x*x) if(k&1) res=res*x;
	return res;
}

int main(){
	n=rd(),m=rd();
	rep(i,1,n) {
		scanf("%s",s+1);
		int u=0;
		for(int j=1;s[j];++j) {
			int &v=nxt[u][s[j]-'a'];
			if(!v) v=++cnt,str[v]=str[u]+s[j];
			u=v;
		}
		End[u]=1;
	}
	rep(i,0,cnt) rep(j,0,25) mk[i]|=nxt[i][j];
	rep(u,0,cnt) {
		rep(j,0,str[u].size()) {
			int v=0;
			rep(k,j,str[u].size()-1) {
				v=nxt[v][str[u][k]-'a'];
				if(!v) {
					v=-1;
					break;
				}
			}
			if(~v && mk[u] && mk[v]) {
				//cout<<"new state "<<u<<' '<<v<<' '<<str[u]<<' '<<str[v]<<endl;
				stx[++stcnt]=u,sty[stcnt]=v;
				id[u][v]=stcnt;
			}
		}
	}
	rep(i,1,stcnt) {
		rep(k,0,25) if(nxt[stx[i]][k] && nxt[sty[i]][k]) {
			int a=nxt[stx[i]][k],b=nxt[sty[i]][k];
			rep(x,1-End[a],1) rep(y,1-End[b],1) {
				int u=a*x,v=y*b;
				if(str[u].size()<str[v].size()) swap(u,v);
				if(!id[u][v]) continue;
				//assert(id[u][v]);
				//cout<<"$"<<i<<' '<<k<<' '<<id[u][v]<<endl;
				::x.a[i][id[u][v]]++;
			}
		}
	}
	/*rep(i,1,m) {
		Mat t=qpow(x,m);
		rep(j,1,stcnt) cout<<t.a[1][j]<<' ';
		puts("");
	}*/
	printf("%d\n",qpow(x,m).a[1][1]);
}