package pdd; import java.util.Scanner; //public class Main { public class game{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(sc.hasNextInt()){ int T = sc.nextInt(); for(int i=0; i<T; i++){ int n ...