


The first line of input contains an integer ‘T,’ denoting the number of test cases. The test cases follow.
The first line of each test case contains a number ‘N’ denoting the number of rows and columns of the matrix.
The next ‘N’ lines of each test case contain ‘N’ integers in each line.
For each test case, if Ninja managed to solve the problem, print “True”. Otherwise, print “False”.
Print the output of each test case in a separate line.
You are not required to print the expected output; it has already been taken care of. Just implement the function.
1<= T <= 50
1<= N <= 100
Time Limit: 1 sec
The idea is to maintain a 2D array that will store the result of the multiplication of a given matrix.
The steps are as follows: