import sys N = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) result = [] sys.setrecursionlimit(1000000) def dfs(i): while A[i] != B[i]: if A[i]-B[i] > 0: if i == 0 or A[i-1] != A[i] - 1: A[i] -= 1 result.append((i+1, "L")) else: dfs(i-1) else: if i == N-1 or A[i+1] != A[i] + 1: A[i] += 1 result.append((i+1, "R")) else: dfs(i+1) for i in range(N): dfs(i) print(len(result)) for res in result: print(*res)