import sys input = sys.stdin.readline N = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) a = [i for i in range(N)] b = [i + 1 for i in range(N)] 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: s.discard(i) continue res.append((i + 1, "R")) a[i] += 1 elif a[i] > b[i]: if i and a[i - 1] == a[i] + 1: s.discard(i) res.append((i + 1, "L")) a[i] -= 1 if a[i] == b[i]: if i + 1 < N and a[i + 1] != b[i + 1] and not (i + 1) in s: s.add(i + 1) if i and a[i - 1] != b[i - 1] and not (i - 1) in s: s.add(i - 1) s.discard(i) print(len(res)) for r in res: print(*r)