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 <algorithm>  
#include <iostream>  
#include <sstream>  
#include <string>  
#include <vector>  
#include <queue>  
#include <set>  
#include <map>  
#include <cstdio>  
#include <cstdlib>  
#include <cctype>  
#include <cmath>  
#include <cstring>
#include <list>  
#include <cassert>
#include <climits>
#include <bitset>
#include <chrono>
#include <random>
using namespace std;

#define PB push_back  
#define MP make_pair  
#define SZ(v) ((int)(v).size())  
#define FOR(i,a,b) for(int i=(a);i<(b);++i)  
#define REP(i,n) FOR(i,0,n)  
#define FORE(i,a,b) for(int i=(a);i<=(b);++i)  
#define REPE(i,n) FORE(i,0,n)  
#define FORSZ(i,a,v) FOR(i,a,SZ(v))  
#define REPSZ(i,v) REP(i,SZ(v))  
std::mt19937 rnd((int)std::chrono::steady_clock::now().time_since_epoch().count());
typedef long long ll;
ll gcd(ll a, ll b) { return b == 0 ? a : gcd(b, a % b); }

const int MAXN = 8;
const int MAXLEN = 5;
const int MOD = 998244353;
void inc(int& a, int b) { if ((a += b) >= MOD) a -= MOD; }

int n, chainlen;
char s[MAXN][MAXLEN + 1];

int nstate;
vector<pair<string, int>> states;
map<pair<string, int>, int> statemp;
vector<vector<int>> trans;

int ensurestate(const string& a, int b) {
	pair<string, int> key = MP(a, b);
	if (statemp.count(key)) return statemp[key];
	int ret = nstate++;
	states.PB(key);
	statemp[key] = ret;
	trans.PB(vector<int>());
	return ret;
}

const ll MODUNDOOVERFLOW = (1ULL << 63) / MOD * MOD;
vector<vector<int>> mmult(const vector<vector<int>>& a, const vector<vector<int>>& b) {
	int nrow = SZ(a), nmid = SZ(a[0]), ncol = SZ(b[0]); vector<vector<int>> ret(nrow, vector<int>(ncol));
	REP(i, nrow) REP(j, ncol) { ll sum = 0; REP(k, nmid) { sum += (ll)a[i][k] * b[k][j]; if (sum < 0) sum -= MODUNDOOVERFLOW; } ret[i][j] = sum % MOD; } return ret;
}
vector<vector<int>> mexp(vector<vector<int>> x, ll n) {
	int dim = SZ(x); vector<vector<int>> ret(dim, vector<int>(dim, 0)); REP(i, dim) ret[i][i] = 1;
	while (true) { if (n & 1) ret = mmult(ret, x); if ((n >>= 1) == 0) return ret; x = mmult(x, x); }
}

int solve() {
	nstate = 0;
	states.clear();
	statemp.clear();
	trans.clear();
	int startstate = ensurestate("", 0);
	REP(at, nstate) {
		if (states[at].second > 0) {
			int to = ensurestate(states[at].first, states[at].second - 1);
			trans[at].PB(to);
		} else if (SZ(states[at].first) > 0) {
			REP(j, n) {
				string a = states[at].first;
				string b = s[j];
				if (SZ(a) < SZ(b)) swap(a, b);
				bool ok = true;
				REPSZ(k, b) if (a[k] != b[k]) ok = false;
				if (!ok) continue;
				int to = ensurestate(a.substr(SZ(b)), SZ(b) - 1);
				trans[at].PB(to);
			}
		} else {
			REP(j1, n) REP(j2, n) {
				string a = s[j1];
				string b = s[j2];
				if (SZ(a) < SZ(b)) swap(a, b);
				bool ok = true;
				REPSZ(k, b) if (a[k] != b[k]) ok = false;
				if (!ok) continue;
				int to = ensurestate(a.substr(SZ(b)), SZ(b) - 1);
				trans[at].PB(to);
			}
		}
	}
	//REP(at, nstate) for (int to : trans[at]) printf("(%s,%d)->(%s,%d)\n", states[at].first.c_str(), states[at].second, states[to].first.c_str(), states[to].second);

	vector<vector<int>> A(nstate, vector<int>(nstate, 0));
	REP(at, nstate) for (int to : trans[at]) inc(A[at][to], 1);
	vector<vector<int>> B = mexp(A, chainlen);
	return B[0][0];
}

void run() {
	scanf("%d%d", &n, &chainlen);
	REP(i, n) scanf("%s", s[i]);
	printf("%d\n", solve());
}

int main() {
	run();
	return 0;
}