<>;map{$m=!//;map$m+=$-=($'^1x($_/99).good.1x($_%99).problem)=~y/\0//-$m,0..1e4;print 11-$m,$/}<>