#include #include using namespace std; using namespace atcoder; #define rep(i, n) REP(i, 0, n) #define REP(i, s, e) for (int i = (s); i < (int)(e); i++) #define repr(i, n) REPR(i, n, 0) #define REPR(i, s, e) for (int i = (int)(s - 1); i >= (int)(e); i--) #define all(r) r.begin(), r.end() #define rall(r) r.rbegin(), r.rend() typedef long long ll; typedef vector vi; typedef vector vl; template T chmax(T& a, const U& b) { if (a >= b) return false; a = b; return true; } template T chmin(T& a, const U& b) { if (a <= b) return false; a = b; return true; } void yes_no(bool f, string yes = "Yes", string no = "No") { cout << (f ? yes : no) << "\n"; } template struct Mat { array, SZ> d; const int n; Mat() : n(SZ) { array tmp; d.fill(tmp); } Mat(const array, SZ>& d) : n(SZ), d(d) {} Mat operator*(const Mat& mt) const { Mat ret; rep(i, SZ) rep(j, SZ) { rep(k, SZ) { ret.d[i][j] += (d[i][k] * mt.d[k][j]); } } return ret; } Mat& operator*=(const Mat& mt) { *this = *this * mt; return *this; } Mat& operator=(const Mat& mt) { d = mt.d; return *this; } Mat(Mat&&) = default; array& operator[](const int n) { return d[n]; } Mat pow(ll n) const { Mat tmp(this->d); Mat ret; rep(i, SZ) ret.d[i][i] = 1LL; while (n > 0) { if (n & 1LL) ret = ret * tmp; tmp *= tmp; n >>= 1; } return ret; } }; void solve() { ll n, k; cin >> n >> k; using mint = modint998244353; Mat mat; rep(i, 4 * n) rep(j, 4 * n) { if (i == 0 && j % 4 == 0) mat[i][j] = mint(4); else if (i == 0) mat[i][j] = mint(3); else if ((i == 1 && j % 4 != 0) || i == j + 1) mat[i][j] = mint(1); else mat[i][j] = mint(0); } mat = mat.pow(k - 1); mint ans = mat[4 * n - 1][0] / mint(5).pow(k); cout << ans.val() << "\n"; } int main() { cin.tie(0); ios::sync_with_stdio(false); int t = 1; // cin >> t; rep(ti, t) solve(); return 0; }