char s[9];n=1023,i,x,y;main(t){ scanf("%d",&t); while(t--){ for(x=0;scanf("%d",&y);x|=1<