#include #include #include using namespace std; typedef long long ll; ll mod = 998244353,f[200010]; ll pw(ll a,ll x){ ll ret = 1; while(x){ if(x&1) (ret *= a) %= mod; (a *= a) %= mod; x /= 2; } return ret; } int main(){ ll i,n; string s; cin >> n >> s; int a = 0,ab = 0,abc = 0,b = 0,bc = 0,bca = 0,c = 0,ca = 0,cab = 0; vector cnt(3); for(i=0;i