ACMICPC 2010 is drawing near and your university want to select three out of N students to form the best team. The university however, has a limited budget, so they can only afford to send one team. The coach wants his best team to be the best in term of compatibility. The compatibility of a team which member is student A, B and C is calculated by P_{A,B} * P_{A,C} * P_{B,C}, where P_{i,j} is the compatibility of student i and student j.
Given P_{i,j} for all pair of students, calculate the highest compatibility value that can be achieved by any team of three students.
The first line of input contains an integer T (1 ≤ T ≤ 100) the number of cases. Each case begins with an integer N (3 ≤ N ≤ 50) the number of students. The next N lines each contains N integers P_{i,j} (0 ≤ P_{i,j} ≤ 100). The i^{th} line and j^{th} integer denotes the compatibility of student i with student j. You may assume P_{i,j} = P_{j,i} and P_{i,i} = 0.
For each test case, output in a line the highest compatibility value that can be achieved by any team of three students.

Explanation for the 1^{st} sample input.
There are only three students so the coach has no choice but to select them.
Explanation for the 2^{nd} sample input.
The best combination would be choosing student 1, 3 and 4.