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.
#include <cstdlib>
#include <iostream>
#include <cstdio>
#include <math.h>
#include <cstring>
#include <time.h>
#include <complex>
#include <algorithm>
#include <queue>
#include <stack>
#include <unordered_map>
#include <set>
#include <bitset>

#pragma warning(disable:4996)
#define PII std::pair<long long, long long>
#define PTT std::pair<tree *, tree *>

template<typename T> T min(T x, T y)
{
	return x < y ? x : y;
}
template<typename T> T max(T x, T y)
{
	return x > y ? x : y;
};

const long long INF = 2000000005;//00000;// autojs.org
const long long mod = 998244353;//1000000007;// 
const int MAXN = 180;

struct vector {
	long long e[MAXN];
	vector() { memset(e, 0, sizeof(e)); }
	vector operator * (int a)
	{
		vector t = *this;
		for (int i = 0; i < MAXN; i++)
			t.e[i] = t.e[i] * a % mod;
		return t;
	}
	vector operator + (vector t)
	{
		for (int i = 0; i < MAXN; i++)
			t.e[i] = (t.e[i] + e[i]) % mod;
		return t;
	}
};
struct matrix {
	vector c[MAXN];
	
	vector operator * (vector &v)
	{
		vector t;
		for (int i = 0; i < MAXN; i++)
			t = t + c[i] * v.e[i];
		return t;
	}
	matrix operator * (matrix &m)
	{
		static matrix t;
	//	for (int i = 0; i < MAXN; i++)
	//		t.c[i] = (*this) * m.c[i];
		for (int i = 0; i < MAXN; i++)
			for (int j = 0; j < MAXN; j++)
			{
				t.c[j].e[i] = 0;
				for (int k = 0; k < MAXN; k++)
					t.c[j].e[i] += c[k].e[i] * m.c[j].e[k] % mod;
				t.c[j].e[i] %= mod;
			}
		return t;
	}
	long long &get(int i, int j) { return c[j].e[i]; }
	void print(int n)
	{
		for (int i = 0; i < n; i++)
			for (int j = 0; j < n; j++)
				printf("%lld%c", c[j].e[i], j == n - 1 ? '\n' : ' ');
	}
	static matrix ID()
	{
		static matrix I;
		for (int i = 0; i < MAXN; i++)
			I.get(i, i) = 1;
		return I;
	}
};
void qpow(matrix &A, int x)
{
	if (!x)
	{
		A = matrix::ID();
		return;
	}
	if (x & 1)
	{
		matrix t = A;
		qpow(A, x / 2);
		A = A * A * t;
	}
	else
	{
		qpow(A, x / 2);
		A = A * A;
	}
}

bool streql(char *a, char *b, int len)
{
	for (int i = 0; i < len; i++)
		if (a[i] != b[i])
			return false;
	return true;
}

matrix A;
int N, M, len[10];
char str[10][10];
int _id[10][10][10];

int id(int n, int i, int j)//j<=i
{
	return _id[n][i][j];
	return n * 25 + i * 5 + j;
}
void init()
{
	int tt = 0;
	for (int i = 0; i < 8; i++)
		for (int j = 0; j < 5; j++)
			for (int k = 0; k <= j; k++)
				_id[i][j][k] = tt++;

	scanf("%d %d", &N, &M);
	for (int i = 0; i < N; i++)
		scanf("%s", str[i]), len[i] = strlen(str[i]);

	for (int i = 0; i < N; i++)
		for (int j = 0; j < len[i]; j++)
			for (int k = 0; k <= j; k++)
			{
				if (j == 0)
				{
					for (int s = 0; s < N; s++)
						for (int t = 0; t < N; t++)
							if (len[t] <= len[s] && streql(str[s], str[t], len[t]))
								A.get(id(s, len[s] - 1, len[t] - 1), id(i, j, k))
								+= 1ll + (len[t] != len[s]);
					continue;
				}
				if (k == 0)
				{
					for (int s = 0; s < N; s++)
					{
						if (len[s] <= j && streql(str[i] + len[i] - j, str[s], len[s]))
							A.get(id(i, j - 1, len[s] - 1), id(i, j, k))++;
						else if (len[s] > j && streql(str[i] + len[i] - j, str[s], j))
							A.get(id(s, len[s] - 1, j - 1), id(i, j, k))++;
					}
					continue;
				}
				A.get(id(i, j - 1, k - 1), id(i, j, k))++;
			}
}
void solve()
{
	vector v;
	v.e[id(0, 0, 0)] = 1;
	matrix m = A;
	qpow(m, M);
	v = m * v;
	long long ans = 0;
	for (int i = 0; i < N; i++)
		ans = (ans + v.e[id(i, 0, 0)]) % mod;
	printf("%lld\n", ans);
}

int main()
{
	init();
	solve();

	return 0;
}