import sys input = sys.stdin.readline N=int(input()) A=list(map(int,input().split())) B=list(map(int,input().split())) ANS=[] while A!=B: for i in range(N): if A[i]B[i]: while A[i]>B[i] and (i==0 or A[i-1]!=A[i]-1): ANS.append((i+1,"L")) A[i]-=1 for i in range(N-1,-1,-1): if A[i]B[i]: while A[i]>B[i] and (i==0 or A[i-1]!=A[i]-1): ANS.append((i+1,"L")) A[i]-=1 print(len(ANS)) for x,y in ANS: print(x,y)