there grid r row c column square ith row jth column integer a_i j write Initially element set 0 we allow follow operation Choose index 1 le le r 1 le j le c replace value row column j value xor 1 in word a_x y xi yj replace a_x y a_x y xor 1 you want form grid b operation finite number time however element b miss replace insteadLet k number character among 2k way fill grid b replace 0 1 count number grid form operation finite number time start grid fill 0 as number large output modulo 998244353