import sys sys.setrecursionlimit(10**7) def I(): return int(sys.stdin.readline().rstrip()) def MI(): return map(int,sys.stdin.readline().rstrip().split()) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LI2(): return list(map(int,sys.stdin.readline().rstrip())) def S(): return sys.stdin.readline().rstrip() def LS(): return list(sys.stdin.readline().rstrip().split()) def LS2(): return list(sys.stdin.readline().rstrip()) N = I() A = LI() B = LI() flag = [0]*(10**6+1) for a in A: flag[a] += 1 def right(x,i): # xにあるコインを1つ右に res = [] if flag[x+1]: res += right(x+1,i+1) flag[x] = 0 flag[x+1] = 1 res.append((i,'R')) A[i-1] += 1 return res ANS = [] for i in range(N): a = A[i] b = B[i] if a >= b: for _ in range(a-b): ANS.append((i+1,'L')) else: for j in range(a,b): X = right(j,i+1) for x in X: ANS.append(x) print(len(ANS)) for k,c in ANS: print(k,c)