{$i exp.inc}

var
    n, i, c, d: int;

begin
    n := strtoint(paramstr(1));
    c := strtoint(paramstr(2));    
    d := strtoint(paramstr(3));

    writeln(n);
    writeln(iLetter[c], ' 0');
    for i := 2 to n do begin
        writeln(iLetter[(c + (i - 1) * d) mod 2], ' 1 ', i - 1);
    end;
end.