import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { int q,n; int[] x=new int[10]; int[] y=new int[10]; int temp1=1,temp2=1; int maxx=0,maxy=0; Scanner sc=new Scanner(System.in); q=sc.nextInt(); while(q!=0){ int test=1; n=sc.nextInt(); for(int i=0;i