import java.io.*; import java.util.*; public class Solution { public static void main(String[] args) throws IOException{ /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); int T = Integer.parseInt(br.readLine()); while(T-->0) { int q = Integer.parseInt(br.readLine()); boolean bad = false; ArrayList A = new ArrayList<>(); for(int i=0;i