import sys
sys.setrecursionlimit(10000000)
def do(i):
  if i==N:
    return;
  if A[i]==B[i]:
    do(i+1)
    return;
  elif A[i]>B[i]:
    for j in range(A[i],B[i],-1):
      Q.append([i,"L"])
    do(i+1)
  else:
    flag=True
    if i!=N-1:
      if B[i]>=A[i+1]:
        do(i+1)
        flag=False
    for j in range(A[i],B[i]):
      Q.append([i,"R"])
    if flag:
      do(i+1)
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
Q=list()
do(0)
print(len(Q))
for a,b in Q:
  print(a+1,b)