import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner scan = new Scanner(System.in); int Q = scan.nextInt(); StringBuilder sb = new StringBuilder(); for(int i = 0; i < Q; i++) { long D = scan.nextLong(); long X = scan.nextLong(); long T = scan.nextLong(); long k = 1; for(long j = 1; j < D; j++) { k = (k * (X + j))/ j; if(k > T) { break; } } if(k <= T) { sb.append("AC").append("\n"); }else { sb.append("ZETUBOU").append("\n"); } } scan.close(); System.out.println(sb.toString()); } }