#pragma GCC optimize("O3")
#pragma GCC target("avx2")

#include <bits/stdc++.h>
#define INF 0x3f3f3f3f
#define LLINF 0x3f3f3f3f3f3f3f3f
#define eps 1e-8
#define pb push_back
#define fi first
#define se second
#define SZ(x) (int)x.size()
#define ALL(x) x.begin(), x.end()
#define db1(x) cout << #x << " = " << x << endl
#define db2(x, y) cout << #x << " = " << x << " " << #y << " = " << y << endl
#define gg cout << "---------QAQ--------\n"
#define MEM(a, b) memset(a, b, sizeof(a))

using namespace std;
typedef pair<int, int> pii;
typedef pair<pii, int> piii;
typedef long long ll;
const int N = 2e5 + 10, M = 1e3+10;
const int mod = 998244353;

int n, m;
int cnt, ncnt;
struct Mat
{
    int a[310][310];
}ans;
Mat operator*(const Mat &x,const Mat &y)
{
    Mat res;
    MEM(res.a, 0);
    for(int i = 1; i <= cnt; ++i)
    for(int k = 1; k <= cnt; ++k)
    for(int j = 1; j <= cnt; ++j)
    res.a[i][j] += 1ll*x.a[i][k]*y.a[k][j]%mod, res.a[i][j] %= mod;
    return res;
}
Mat ksm(Mat x, ll y)
{
    Mat res;
    for(int i = 1; i <= cnt; ++i)
    for(int j = 1; j <= cnt; ++j) res.a[i][j] = (i==j);
    while(y)
    {
        if(y&1) res = res*x;
        x = x*x;
        y >>= 1;
    }
    return res;
}
int tire[310][30], num[110];
char s[110];
int coun[2010][2010];
int dfs(int x, int y)
{
    if(coun[x][y]) return coun[x][y];
    coun[x][y] = ++cnt;
    int cur = cnt;
    for(int i = 0; i < 26; ++i) {
        if(tire[x][i]&&tire[y][i]) {
            int dx = tire[x][i], dy = tire[y][i];
            ans.a[cur][dfs(0, 0)] = (ans.a[cur][dfs(0, 0)]+num[dx]*num[dy]);
            ans.a[cur][dfs(dx, 0)] = (ans.a[cur][dfs(dx, 0)]+num[dy]);
            ans.a[cur][dfs(0, dy)] = (ans.a[cur][dfs(0, dy)]+num[dx]);
            ans.a[cur][dfs(dx, dy)] = (ans.a[cur][dfs(dx, dy)]+1);
        }
    }
    return cur;
}

void sol()
{
    scanf("%d%d", &n, &m);
    for(int i = 1; i <= n; ++i) {
        scanf("%s", s);
        int rt = 0;
        for(int j = 0; s[j]; ++j) {
            int x = s[j]-'a';
            if(!tire[rt][x]) tire[rt][x] = ++ncnt;
            rt = tire[rt][x];
        }
        num[rt]++;
    }
    
    dfs(0, 0);
    ans = ksm(ans, m);
    
    printf("%d\n", ans.a[1][1]);
}  
int main()
{
    //int _;scanf("%d", &_);while (_--)
        sol();
    return 0;
}