public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int cases=scanner.nextInt();
        scanner.nextLine();//去掉第一行的enter
        while (cases-->0){
            System.out.println(judge(getInput(scanner),getInput(scanner)));
        }
    }