import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] a = new int[n]; for (int i = 0; i < n; i++) { a[i] = sc.nextInt(); } int[] b = new int[n]; for (int i = 0; i < n; i++) { b[i] = sc.nextInt(); } sc.close(); List l = new ArrayList<>(); List r = new ArrayList<>(); for (int i = 0; i < n; i++) { if (a[i] > b[i]) { l.add(i); } if (a[i] < b[i]) { r.add(i); } } Collections.reverse(r); List list = new ArrayList<>(); for (int i : l) { int d = a[i] - b[i]; String s = (i + 1) + " L"; for (int j = 0; j < d; j++) { list.add(s); } } for (int i : r) { int d = b[i] - a[i]; String s = (i + 1) + " R"; for (int j = 0; j < d; j++) { list.add(s); } } PrintWriter pw = new PrintWriter(System.out); pw.println(list.size()); for (String s : list) { pw.println(s); } pw.flush(); } }