#include <bits/stdc++.h>
using namespace std;
int solve(const string &s, const string &t) {
  const int MOD = 998244353;
  int n = s.size();
  int m = t.size();
  vector<vector<int>> sm(n, vector<int>(n));
  for (int j = 0; j < n; ++j) {
    if (j >= m || s[0] == t[j]) {
      sm[0][j] = 2;
    }
  }
  for (int i = 1; i < n; ++i) {
    for (int j = 0; j + i < n; ++j) {
      if (j >= m || s[i] == t[j]) {
        sm[i][j] = (sm[i][j] + sm[i - 1][j + 1]) % MOD;
      }
    }
    for (int j = i; j < n; ++j) {
      if (j >= m || s[i] == t[j]) {
        sm[i][j - i] = (sm[i][j - i] + sm[i - 1][j - i]) % MOD;
      }
    }
  }
  int ret = 0;
  for (int i = m - 1; i < n; ++i) {
    ret = (ret + sm[i][0]) % MOD;
  }
  return ret;
}
int main() {
  string s, t;
  while (cin >> s >> t) {
    cout << solve(s, t) << endl;
  }
  return 0;
}
