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:
#pragma GCC optimize("Ofast","unroll-loops","omit-frame-pointer","inline")
#pragma GCC option("arch=native","tune=native","no-zero-upper")
#pragma GCC target("avx2")
#include <bits/stdc++.h>
using namespace std;
#define INF 2147483647
#define infL (1LL<<60)
#define inf (1<<30)
#define inf9 (1000000000)
#define MOD 998244353//1000000007
#define EPS 1e-9
#define Gr 9.8
#define PI acos(-1)
#define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define REQ(i,n) for(int (i)=1;(i)<=(int)(n);(i)++)
#define lch (rt<<1)
#define rch (rt<<1|1)
#define readmp(n) for(int i=0,u,v;i<n;i++) {scanf("%d%d",&u,&v); mp[u].push_back(v); mp[v].push_back(u);}
typedef  long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef long double ld;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef ll ValType;
template<typename  T> void maxtt(T& t1, T t2) {
    t1=max(t1,t2);
}
template<typename  T> void mintt(T& t1, T t2) {
    t1=min(t1,t2);
}
#define MAX (135)

bool debug = 0;
int n,m,k;
int dx[4] = {0,1,0,-1}, dy[4] = {1,0,-1,0};
string direc="RDLU";
const ll MOD2 = (ll)MOD * (ll)MOD;
ll ln, lk, lm;
void etp(bool f = 0) {
    puts(f ?"YES" : "NO");
    exit(0);
}
void addmod(int &x, int y, int mod = MOD){
    x+=y; if (x>=mod) x-=mod;
    if(x<0) x+=mod;
    assert(x>=0 && x<mod);
}
void et(int x=-1) {
    printf("%d\n", x); exit(0);
}
ll fastPow(ll x, ll y, int mod=MOD) {
    ll ans = 1;
    while(y>0) {
        if(y&1) ans = (x * ans)%mod;
        x = x*x%mod;
        y>>=1;
    }
    return ans;
}
ll gcd1(ll x, ll y) {
    return y?gcd1(y,x%y):x;
}

//#include <atcoder/all>
//using mint = atcoder::modint1000000007;

string S[10];
int tr[50][26],cnt=1, ed[50*26];
void add(int id) {
    int N=S[id].size();
    int rt=1;
    for(int i=0;i<N;i++) {
        int c=S[id][i]-'a';
        if (tr[rt][c]==0) tr[rt][c]=++cnt;
        rt=tr[rt][c];
    }
    ed[rt]=id;
}
struct Matrix {
    int n,m;
    vector<vector<int>> a;
    Matrix() { }
    Matrix(int n, int m) : n(n), m(m) {
        a.resize(n, vector<int>(m));
    }
    void init(int num) {
        REP(i,n)REP(j,m)a[i][j]=num;
    }
    
    Matrix operator*(Matrix b) {
        Matrix o = Matrix(n, b.m);
        for(int i=0;i<n;i++) {
            for(int j=0;j<b.m;j++) {
                o.a[i][j]=0;
                for(int k=0;k<m;k++) {
                    addmod(o.a[i][j], (ll)a[i][k] * b.a[k][j] % MOD);
                }
            }
        }
        return o;
    }
    Matrix pow(ll p) {
        Matrix o = Matrix(n,m);
        Matrix b = *this;
        for(int i=0;i<n;i++)for(int j=0;j<m;j++) o.a[i][j] = (i==j);
        while(p>0) {
            if (p&1) o=o*b;
            b=b*b; p>>=1;
        }
        return o;
    }
};
map<pii,int> mp;
int mpi;
queue<pii> q;
int gid(int x, int y) {
    if(x>y) swap(x,y);
    if (mp.find({x,y}) == mp.end()) {
        mp[{x,y}]=mpi++;
        q.push({x,y});
    }
    return mp[{x,y}];
}
int A[200][200];
void fmain(int tid) {
    scanf("%d%d", &n, &m);
    REQ(i,n) cin>>S[i];
    REQ(i,n) add(i);
    gid(1,1);
    while (!q.empty()) {
        auto [x,y]=q.front();
        q.pop();
        int id=gid(x, y);
        REP(j,26) {
            int X=tr[x][j],Y=tr[y][j];
            if(X==0||Y==0) continue;
            A[id][gid(X, Y)]++;
            if(ed[X]) A[id][gid(1, Y)]++;
            if(ed[Y])A[id][gid(X, 1)]++;
            if(ed[X]&&ed[Y]) {
                A[id][gid(1, 1)]++;
            }
        }
    }
    Matrix mt=Matrix(mpi, mpi);
    REP(i,mpi)REP(j,mpi)mt.a[i][j]=A[i][j];
    Matrix B=mt.pow(m);
    printf("%d\n",B.a[0][0]);
}
int main() {
//    freopen("in21.txt","r",stdin);
   // freopen("output.txt","w",stdout);
    int t=1;
//    init();
//    scanf("%d", &t);
    REQ(i,t) {
        fmain(i);
    }
    return 0;
}