$|=<>; @0=(0)x100; @1=(0)x100; for$p(0,1){ for$d(1..9){ $t=("$d?","?$d")[$p]; $n=10; $r=110-$d*10; $i=-1; while($n>0&&$n<$r){ if($r>2){ $k1=$i+1; while($$p[$k1]){ ++$k1; } $k2=$k1+1; while($$p[$k2]){ ++$k2; } print join($",('??')x$k1,$t,('??')x($k2-$k1-1),$t,('??')x(99-$k2)),$/; $b=(glob<>)[1]; }else{ $b=1; } if($b==1){ print join($",('??')x$k1,$t,('??')x(99-$k1)),$/; if((glob<>)[1]==1){ $$p[$k1]=$d; }else{ $$p[$k2]=$d; } } if($b==2){ $$p[$k1]=$$p[$k2]=$d; $n-=2; } $i=$k2; $r-=2; $n-=$b; } } } print join($",map$0[$_].$1[$_],0..99),$/;