you give binary square matrix b size n time n a matrix call binary element equal 0 1 you follow operation matrix arbitrary number times 0 vertical xor you choose number j 1 le j le n 1 le le n follow a_i j a_i j oplus 1 oplus operation xor exclusive horizontal xor you choose number 1 le le n j 1 le j le n follow a_i j a_i j oplus 1 Note element matrix change operationFor example n3 matrix beginpmatrix 1 1 0 0 0 1 1 1 0 endpmatrix then follow sequence operation show example transformation vertical xor j1 beginpmatrix 0 1 0 1 0 1 0 1 0 endpmatrix horizontal xor i2 beginpmatrix 0 1 0 0 1 0 0 1 0 endpmatrix vertical xor j2 beginpmatrix 0 0 0 0 0 0 0 0 0 endpmatrix check sequence operation matrix equal matrix b