import sys sys.setrecursionlimit(10**7) N = int(input()) lsA = list(map(int,input().split())) lsB = list(map(int,input().split())) moves = [] def moveto(n,k): if lsA[n] == k: return if n == N-1: while lsA[n] != k: moves.append((n,'R')) lsA[n] += 1 else: while lsA[n] != k: if lsA[n]+1 == lsA[n+1]: moveto(n+1,lsA[n+1]+1) moves.append((n,'R')) lsA[n] += 1 else: moves.append((n,'R')) lsA[n] += 1 for i in range(N): move = lsB[i]-lsA[i] now = lsA[i] if move <= 0: while move != 0: moves.append((i,'L')) move += 1 else: stac = [] moveto(i,lsB[i]) print(len(moves)) for a,b in moves: print(a+1,b)