{$apptype console}
{$o-,r+,q+}
uses
  sysutils, math;

type
  int = longint;

function randomString(l : int) : string;
var
  i : int;
begin
  result := '';
  for i := 1 to l do
  begin
    result := result + chr(ord('a') + random(26));
  end;
end;

procedure swap(var l, r : int);
var
  t : int;
begin
  t := l;
  l := r;
  r := t;
end;

procedure randomOp(n : int);
var
  op : char;
  l, r : int;
begin
  l := 1 + random(n);
  r := 1 + random(n);
  if (l > r) then
  begin
    swap(l, r);
  end;  
  if (random(2) = 1) then
  begin
    op := 'S';
  end else begin
    op := 'R';
  end;
  writeln(op, ' ', l, ' ', r);
end;

var
  i : int;

begin
  randseed := 3424718;
  writeln(randomString(200));
  writeln(200);
  for i := 1 to 200 do
  begin
  	randomOp(200);
  end;
end.