program gen06;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  p,n,k,i,t,l:integer;

begin
  randseed := strtoint(paramstr(1));
  n := strtoint(paramstr(2));
  k := strtoint(paramstr(3));
  p := strtoint(paramstr(4));
  writeln(2*(n div 2),' ',k,' ',p);
  for i:=1 to n div 2 do
  begin
    t := random(k-1)+1;
    l := random(99)+1;
    writeln('+ ',t,' ',l);
    writeln('- ',t,' ',l);
  end;
end.
