#include <bits/stdc++.h>   using namespace std;   using LL = long long;   const LL MOD = 998244353;   string s;   LL cal(int x) {     if (x < 10 || x > 18) return 0;     return 9 - (x - 10);   }   struct SegmentTree {     struct Node {       int L, R, l, r;       LL v[2][2];     };     vector<Node> N;     int p;     vector<int> rt;     int n;     inline void init(int _n) {       n = _n;       N.resize(n * 4);       p = 1;       rt.clear();       rt.push_back(build(0, n));     }     inline int copy(Node u) { return N[p] = u, p++; }     int build(int L, int R) {       int u = copy({L, R}), M = (L + R) >> 1;       ;       if (R - L == 1)         return N[u].v[0][0] = s[L] -  0  + 1, N[u].v[0][1] = 1, N[u].v[1][0] = 1,                N[u].v[1][1] = 0, u;       return pull(u, build(L, M), build(M, R));     }     inline int push(int u) { return u; }     inline int pull(int u, int l, int r) {       if (!l || !r) return l ? l : r;       push(N[u].l = l);       push(N[u].r = r);       for (int i = 0; i < 2; i++) {         for (int j = 0; j < 2; j++) {           N[u].v[i][j] =               (N[l].v[i][0] * N[r].v[0][j] +                N[l].v[i][1] * N[r].v[1][j] % MOD *                    cal((s[N[l].R - 1] -  0 ) * 10 + (s[N[r].L] -  0 ))) %               MOD;         }       }       return u;     }     int m(int L, int R, int u, int v) {       if (!u || R <= N[u].L || N[u].R <= L) return u;       push(u);       if (L <= N[u].L && N[u].R <= R) return N[u].v[0][0] = v + 1, u;       return pull(u, m(L, R, N[u].l, v), m(L, R, N[u].r, v));     }     int q(int L, int R, int u) {       if (!u || R <= N[u].L || N[u].R <= L) return 0;       if (L <= N[u].L && N[u].R <= R) return u;       push(u);       return pull(copy(N[u]), q(L, R, N[u].l), q(L, R, N[u].r));     }     inline void modify(int L, int R, int ver, int v) {       rt[ver] = m(L, R, rt[ver], v);     }     inline Node& query(int L, int R, int ver) {       p = 2 * n + 1;       return N[q(L, R, rt[ver])];     }   } solver;   int main() {     ios_base::sync_with_stdio(false);     cin.tie(0);     int n, q;     cin >> n >> q;     cin >> s;     solver.init(n);     while (q--) {       int x, d;       cin >> x >> d;       x--;       s[x] =  0  + d;       solver.modify(x, x + 1, 0, d);       auto v = solver.query(0, n, 0).v;       cout << v[0][0] <<   n ;     }   }   