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 pair<int,int> pii;
const int MAXN = 8 + 5;
const int MAXL = 5 + 5;
const int mod = 998244353;

inline void add_mod(int &a,int b){ a+=b; if(a>=mod) a-=mod;}

inline ll pw(ll a,ll b)
{
	ll res = 1;
	while(b)
	{
		if(b&1) res=res*a%mod;
		a=a*a%mod; b>>=1;
	}
	return res;
}

vector<int> Berlekamp_Massey(const vector<int> &a)
{
	int n = (int)a.size(), len = 0, m = 0, ld = 1;
	vector<int> res(n), lst(n), tmp;
	res[0] = lst[0] = 1;
	for(int i=0; i<n; ++i)
	{
		++m;
		int d = a[i];
		for(int j=1; j<=len; ++j) d = (d + (ll)res[j] * a[i - j]) %mod;
		if(!d) continue;
		tmp = res;
		ll mul = d * pw(ld, mod - 2) %mod;
		for(int j=m; j<n; ++j) res[j] = (res[j] - mul * lst[j - m]) %mod;
		if((len << 1) > i) continue;
		len = i + 1 - len;
		ld = d; lst = tmp; m = 0;
	}
	
	res.resize(len+1);
	res.erase(res.begin());
	for(int i=0; i<(int)res.size(); ++i) add_mod(res[i] = -res[i], mod);
	return res;
}

namespace Linear_Rec
{
	inline vector<int> combine(const vector<int> &a,const vector<int> &b,const vector<int> &tr)
	{
		vector<int> res((int)a.size() + (int)b.size() - 1);
		for(int i=0; i<(int)a.size(); ++i)
			for(int j=0; j<(int)b.size(); ++j)
				res[i+j] = (res[i+j] + (ll)a[i] * b[j]) %mod;
		for(int i=(int)res.size()-1; i>=(int)tr.size(); --i)
			for(int j=0; j<(int)tr.size(); ++j)
				add_mod(res[i - j - 1], (ll)res[i] * tr[j] %mod);
		res.resize(tr.size());
		return res;
	}
}

inline int linear_rec(const vector<int> &s,const vector<int> &tr,int k)
{
	using namespace Linear_Rec;
	
	int n = (int)tr.size();
	vector<int> res(n), a(n);
	res[0] = a[1] = 1;
	while(k)
	{
		if(k&1) res=combine(res,a,tr);
		a=combine(a,a,tr); k>>=1;
	}
	
	int ans = 0;
	for(int i=0; i<(int)tr.size(); ++i)
		ans = (ans + (ll)res[i] * s[i]) %mod;
	return ans;
}

char s[MAXN][MAXL];
int len[MAXN];

const int lim = 2e2;
const int LIM = lim + 5;

int f[LIM][MAXN][MAXL];
vector< pair<int,pii> > to[MAXN][MAXL];

inline bool chk_suf(int x,int l,int y)
{
	for(int i=len[x]-l+1, j=1; i<=len[x] && j<=len[y]; ++i, ++j)
		if(s[x][i] != s[y][j]) return 0;
	return 1;
}

inline pair<int,pii> get_nxt(int x,int xl,int y,int yl)
{
	if(xl == yl)
		return make_pair(xl, make_pair(0, 0));
	else if(xl < yl)
		return make_pair(xl, make_pair(y, yl - xl));
	else
		return make_pair(yl, make_pair(x, xl - yl));
}

int main(void)
{
	int n,m;
	scanf("%d%d",&n,&m);
	for(int i=1; i<=n; ++i)
		scanf("%s",s[i]+1), len[i] = strlen(s[i] + 1);
	
	for(int i=1; i<=n; ++i)
		for(int j=1; j<len[i]; ++j)
			for(int k=1; k<=n; ++k) if(chk_suf(i,j,k))
				to[i][j].push_back(get_nxt(i, j, k, len[k]));
	
	for(int i=1; i<=n; ++i)
		for(int j=1; j<=n; ++j) if(chk_suf(i,len[i],j))
			to[0][0].push_back(get_nxt(i, len[i], j, len[j]));
	
	f[0][0][0] = 1;
	for(int i=0; i<lim; ++i)
		for(int j=0; j<=n; ++j)
		{
			int kl = j? 1: 0, kr = j? len[j]-1: 0;
			for(int k=kl; k<=kr; ++k) if(f[i][j][k])
			{
				vector< pair<int,pii> > &vec = to[j][k];
				for(int it=0; it<(int)vec.size(); ++it)
				{
					int ii = i + vec[it].first, jj = vec[it].second.first, kk = vec[it].second.second;
					if(ii < lim)
						add_mod(f[ii][jj][kk], f[i][j][k]);
				}
			}
		}
	vector<int> g(lim);
	for(int i=0; i<lim; ++i) g[i] = f[i][0][0];
	
	printf("%d",linear_rec(g, Berlekamp_Massey(g), m));
	return 0;
}