import sys input = sys.stdin.readline N = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) res = [] for i in range(N): x = a[i] y = b[i] while x != y: if x < y: res.append((i + 1, "R")) x += 1 else: res.append((i + 1, "L")) x -= 1 print(len(res)) for r in res: print(*r)