N=int(input()) A=["*"]+list(map(int,input().split()))+[10**8] B=["*"]+list(map(int,input().split()))+[10**8] D=[0]*(N+2) for i in range(1,N+1): if A[i]B[i]: D[i]=-1 X=[] Y=[] a=D[1] for i in range(1,N+2): if D[i]!=a: X.append(Y) Y=[] Y.append(i) X.append(Y) Command=[] for y in X: if D[y[0]]==1: for z in y[::-1]: while A[z]B[z]: Command.append((z,"L")) A[z]-=1 else: continue print(len(Command)) for c in Command: print(*c)