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;

#ifdef LOCAL
#include "/debug.h"
#else
#define db(...)
#endif

#define all(v) v.begin(), v.end()
#define pb push_back
using ll = long long;
const int NAX = 2e5 + 5, MOD = 998244353;

const int kmod = MOD;

int mul(int a, int b, int mod = kmod)
{
    return (long long)a * b % mod;
}

int add(int a, int b, int mod = kmod)
{
    a += b;
    if (a >= mod)
        a -= mod;
    return a;
}

int sub(int a, int b, int mod = kmod)
{
    a -= b;
    if (a < 0)
        a += mod;
    return a;
}

int power(int base, int index, int mod = kmod)
{
    if (index == 0)
        return 1;
    int temp = power(base, index / 2, mod);
    temp = mul(temp, temp, mod);
    if (index & 1)
        temp = mul(temp, base, mod);
    return temp;
}

int mod_inv(int x, int mod = kmod)
{
    return power(x, mod - 2, mod);
}

// const int _n = 2e5 + 10;
// vector<int> Fact(_n), Inv(_n);

// void pre()
// {
//     Fact[0] = 1;
//     for (int i = 1; i < _n; ++i)
//         Fact[i] = mul(Fact[i - 1], i);
//     Inv[_n - 1] = mod_inv(Fact[_n - 1]);
//     for (int i = _n - 2; i >= 0; --i)
//         Inv[i] = mul(Inv[i + 1], (1 + i));
// }

// int ncr(int n, int r)
// {
//     if (n < 0 || r < 0 || n - r < 0)
//         return 0;
//     return mul(Fact[n], mul(Inv[r], Inv[n - r]));
// }

// int npr(int n, int r)
// {
//     if (n < 0 || r < 0 || n - r < 0)
//         return 0;
//     return mul(Fact[n], Inv[n - r]);
// }

struct matrix
{
    vector<vector<long long>> MAT;
    matrix() {}
    matrix(long long n, long long m)
    {
        MAT.resize(n, vector<long long>(m));
    }
};

matrix mul(const matrix &A, const matrix &B)
{
    int n = A.MAT.size(), m = B.MAT.size(), k = B.MAT[0].size();
    matrix X(n, k);
    for (int i = 0; i < n; ++i)
        for (int j = 0; j < k; ++j)
        {
            X.MAT[i][j] = 0;
            for (int k = 0; k < m; ++k)
                X.MAT[i][j] = add(X.MAT[i][j], mul(A.MAT[i][k], B.MAT[k][j]));
        }
    return X;
}

matrix unit(int n)
{
    matrix X(n, n);
    for (int i = 0; i < n; ++i)
        X.MAT[i][i] = 1;
    return X;
}

matrix power(const matrix &A, long long index)
{
    matrix temp;
    if (index == 0)
        return unit(A.MAT.size());
    temp = power(A, index / 2);
    temp = mul(temp, temp);
    if (index & 1)
        return mul(temp, A);
    return temp;
}

const int AL = 26;

struct node
{
    int nxt[AL];
    bool term;
    node()
    {
        memset(nxt, -1, sizeof(nxt));
        term = false;
    };
    int &operator[](const int x)
    {
        return nxt[x];
    }
};

vector<node> trie = vector<node>(1, node());

void add(const string &s)
{
    int cur = 0;
    int d = 1;
    for (const char &c : s)
    {
        ++d;
        if (trie[cur][c - 'a'] == -1)
        {
            trie[cur][c - 'a'] = trie.size();
            trie.push_back(node());
        }
        cur = trie[cur][c - 'a'];
    }
    trie[cur].term = true;
}

map<pair<int, int>, int> num;
queue<pair<int, int>> q;

int get(int u, int v)
{
    if (u > v)
        swap(u, v);
    if (num.find({u, v}) == num.end())
    {
        int k = num.size();
        num[{u, v}] = k;
        q.push({u, v});
    }
    return num[{u, v}];
}

void solveCase()
{
    int n, m;
    cin >> n >> m;
    for (size_t i = 0; i < n; i++)
    {
        string s;
        cin >> s;
        add(s);
    }
    q.push({0, 0});
    num[{0, 0}] = 0;
    matrix init(170, 170);
    while (!q.empty())
    {
        auto top = q.front();
        q.pop();
        int x = num[top];
        db(top, x);
        for (int i = 0; i < AL; i++)
        {
            int tov = trie[top.first][i];
            int tou = trie[top.second][i];
            if (tov == -1 || tou == -1)
                continue;
            init.MAT[x][get(tov, tou)]++;
            if (trie[tov].term)
                init.MAT[x][get(0, tou)]++;
            if (trie[tou].term)
                init.MAT[x][get(tov, 0)]++;
            if (trie[tov].term && trie[tou].term)
                init.MAT[x][get(0, 0)]++;
        }
    }
    init = power(init, m);
    cout << init.MAT[0][0] << '\n';
}

int32_t main()
{
#ifndef LOCAL
    ios_base::sync_with_stdio(0);
    cin.tie(0);
#endif
    int t = 1;
    // cin >> t;
    for (int i = 1; i <= t; ++i)
        solveCase();
    return 0;
}