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;
#define m_p make_pair
#define all(x) (x).begin(),(x).end()
#define sz(x) ((int)(x).size())
#define fi first
#define se second
typedef long long ll;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
mt19937 rnf(2106);
const int M = 998244353;

int n, m;
string a[8];
int s[8];

struct ban
{
    int a[5][8][6][5][8][6] = {};
};
ban operator*(const ban& a, const ban& b)
{
    ban c;
    for (int i = 0; i < 5; ++i)
    {
        for (int j = 0; j < n; ++j)
        {
            for (int k = 0; k <= s[j]; ++k)
            {
                for (int ii = 0; ii < 5; ++ii)
                {
                    for (int jj = 0; jj < n; ++jj)
                    {
                        for (int kk = 0; kk <= s[jj]; ++kk)
                        {
                            for (int iii = 0; iii < 5; ++iii)
                            {
                                for (int jjj = 0; jjj < n; ++jjj)
                                {
                                    for (int kkk = 0; kkk <= s[jjj]; ++kkk)
                                    {
                                        c.a[i][j][k][ii][jj][kk] = (c.a[i][j][k][ii][jj][kk] +
                            a.a[i][j][k][iii][jjj][kkk] * 1LL * b.a[iii][jjj][kkk][ii][jj][kk]) % M;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    return c;
}

ban ast(ban x, int n)
{
    ban ans;
    for (int i = 0; i < 5; ++i)
    {
        for (int j = 0; j < ::n; ++j)
        {
            for (int k = 0; k <= s[j]; ++k)
            {
                ans.a[i][j][k][i][j][k] = 1;
            }
        }
    }
    while (n)
    {
        if (n % 2)
            ans = (ans * x);
        x = (x * x);
        n /= 2;
    }
    return ans;
}

void solv()
{
    cin >> n >> m;
    for (int i = 0; i < n; ++i)
    {
        cin >> a[i];
        s[i] = sz(a[i]);
    }

    ban t;
    {
        for (int j = 0; j < n; ++j)
        {
            for (int k = 0; k <= s[j]; ++k)
            {
                if (k == 0)
                {
                    for (int u1 = 0; u1 < n; ++u1)
                    {
                        for (int u2 = 0; u2 < n; ++u2)
                        {
                            bool z = true;
                            for (int kk = 0; kk < min(s[u1], s[u2]); ++kk)
                            {
                                if (a[u1][kk] != a[u2][kk])
                                {
                                    z = false;
                                    break;
                                }
                            }
                            if (!z)
                                continue;
                            if (s[u1] > s[u2])
                                t.a[0][j][k][s[u2] - 1][u1][s[u1] - s[u2]]++;
                            else
                                t.a[0][j][k][s[u1] - 1][u2][s[u2] - s[u1]]++;
                        }
                    }
                }
                else
                {
                    string g = "";
                    for (int kk = s[j] - k; kk < s[j]; ++kk)
                        g += a[j][kk];
                    for (int u = 0; u < n; ++u)
                    {
                        bool z = true;
                        for (int kk = 0; kk < min(k, s[u]); ++kk)
                        {
                            if (g[kk] != a[u][kk])
                            {
                                z = false;
                                break;
                            }
                        }
                        if (!z)
                            continue;
                        if (k > s[u])
                            t.a[0][j][k][s[u] - 1][j][k - s[u]]++;
                        else
                            t.a[0][j][k][k - 1][u][s[u] - k]++;
                    }
                }
            }
        }
    }
    for (int i = 1; i < 5; ++i)
    {
        for (int j = 0; j < n; ++j)
        {
            for (int k = 0; k <= s[j]; ++k)
            {
                t.a[i][j][k][i - 1][j][k]++;
            }
        }
    }

    t = ast(t, m);
    int ans = 0;
    for (int j = 0; j < n; ++j)
    {
        ans = (ans + t.a[0][0][0][0][j][0]) % M;
    }

    cout << ans << "\n";
}

int main()
{
    #ifdef SOMETHING
    freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    #endif // SOMETHING
    ios_base::sync_with_stdio(false), cin.tie(0);

    int tt = 1;
    //cin >> tt;
    while (tt--)
    {
        solv();
    }
    return 0;
}