#include <iostream>
using namespace std;
int main(){
int t = 0;
cin >> t;
int counter = 1;
while(t--){
string str = "";
int n = 0;
cin >> str >> str >> n;
int sqr[n][n] = {0};
for(int i = 0 ; i < n ; i++){
for(int j = 0 ; j < n ; j++){
cin >> sqr[i][j];
}
}
bool flag = true;
for(int i = 0 ; i < n ; i++){
for(int j = 0 ; j < n ; j++){
if(sqr[i][j] != sqr[n-1-i][n-1-j] || sqr[i][j] < 0){
flag = false;
break;
}
}
}
if(flag == true){
cout << "Test #" << counter << ": Symmetric."<< endl;
}else{
cout << "Test #" << counter << ": Non-symmetric."<< endl;
}
counter++;
}
}