N = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) M = sum([abs(a - b) for (a, b) in zip(A, B)]) print(M) for i in range(N)[::-1]: if A[i] <= B[i]: for _ in range(B[i] - A[i]): print(i+1, 'R') for i in range(N): if A[i] > B[i]: for _ in range(A[i] - B[i]): print(i+1, 'L')