let () = Scanf.scanf "%d\n" @@ fun n ->
  let xys = Array.to_list @@ Array.init n @@ fun _ -> Scanf.scanf "%d %d\n" @@ fun x y -> x, y in
  try
    let odd =
      match
        List.for_all (fun (x, y) -> (x land 1) = (y land 1)) xys,
        List.for_all (fun (x, y) -> (x land 1) <> (y land 1)) xys
      with
      | false, true -> true
      | true, false -> false
      | _, _ -> raise Not_found in
    print_string (if odd then "39\n" else "40\n1 ");
    for i = 38 downto 0 do
      Printf.printf "%d " @@ 1 lsl i
    done;
    print_newline ();
    let solve =
      Array.fold_right (fun d (x, y) ->
        match 0 <= x + y, 0 <= x - y with
        | true, true -> 
            print_char 'R'; (x - d, y)
        | true, false -> 
            print_char 'U'; (x, y - d)
        | false, true -> 
            print_char 'D'; (x, y + d)
        | false, false -> 
            print_char 'L'; (x + d, y)
            ) @@
      Array.init 39 @@ ( lsl ) 1 in
    List.iter (fun (x, y) ->
      ignore (solve
        ( if odd
          then (x, y)
          else (print_char 'L'; (x + 1, y)) ));
      print_newline ()) xys
  with Not_found -> print_endline "-1"
