char s[9];n=1023,i,x;main(y){for(*s=78;n&=*s-78?x:~x,~gets(s);)for(x=0;scanf("%d",&y);x|=1<