function testuj(i:integer):boolean; {jen se zeptá zda je kabel i vpravo právě zapojen} var c:char; begin write('?',i,' ');readln(c);testuj:=c='a'; end; var i,j,N:integer; r:array[1..N] of integer; begin readln(N); for i:=0 to trunc(log2(N)) do begin for j:=1 to N do if (j and (1 shl i))<>0 then writeln('+',j); for j:=1 to N do if testuj(j) then r[j]:=r[j] or (1 shl i); for j:=1 to N do if (j and (1 shl i))<>0 then writeln('-',j); end; for j:=1 to N do if r[j]<>0 then writeln(r[j],'->',j); end.