long t,s;x,d;main(i){for(gets(&i);s=~scanf("%d%d%ld",&d,&x,&t);puts(s>t?"ZETUBOU":"AC"))for(x+=d,x-d