import sys input = sys.stdin.readline N = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) res = [] s = {i for i in range(N)} while len(s): t = set(s) for i in t: if a[i] < b[i]: if i + 1 < N and a[i + 1] == a[i] + 1: continue res.append((i + 1, "R")) a[i] += 1 elif a[i] > b[i]: if i and a[i - 1] == a[i] + 1: continue res.append((i + 1, "L")) a[i] -= 1 if a[i] == b[i]: s.discard(i) print(len(res)) for r in res: print(*r)