from collections import deque N = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) def is_movable(n): if A[n] == B[n]: return False elif A[n] < B[n]: if n == N - 1: return True else: return B[n] < A[n + 1] elif A[n] > B[n]: if n == 0: return True else: return B[n] > A[n - 1] q = deque([]) for i in range(N): if A[i] == B[i]: continue q.append(i) result = [] while q: #print("*A", *A) i = q.popleft() #print(i) if not is_movable(i): continue #print(i, "is movable") if A[i] < B[i]: for j in range(B[i] - A[i]): result.append('%d R' % (i + 1)) elif A[i] > B[i]: for j in range(A[i] - B[i]): result.append('%d L' % (i + 1)) A[i] = B[i] if i != 0: q.append(i - 1) if i != N - 1: q.append(i + 1) print(len(result)) print(*result, sep='\n')