you give string x y consist lowercase latin letter let s length string sLets sequence merging sequence consist exactly x zero exactly y one orderA merge z produce sequence follow rule a_i0 remove letter begin x append end z a_i1 remove letter begin y append end z two merging sequence b different position a_i neq b_ilet stre z chaotic 2 z z_i1 neq z_ilet slr 1 le l le r le s substre consecutive letter s start position l end position r inclusiveLet fl_1 r_1 l_2 r_2 number different merging sequence xl_1r_1 yl_2r_2 produce chaotic merge note nonempty substring x y consideredCalculate sum limits_1 le l_1 le r_1 le x 1 le l_2 le r_2 le y fl_1 r_1 l_2 r_2 Output answer modulo 998244353