Symmetric Matrix
T=input()
for t in range(int(T)):
n=list(input().split())
n=int(n[2])
arr=[]
c=0
for i in range(n):
arr.append(list(map(int,input().split())))
for i in range(n):
for j in range(n):
if arr[i][j]!=arr[n-i-1][n-j-1] or arr[i][j]<0:
c=1
break
if c==0:
print('Test #'+str(t+1)+': Symmetric.')
else:
print('Test #'+str(t+1)+': Non-symmetric.')