#!/usr/bin/env python3 # from typing import * import sys import io import math import collections import decimal import itertools import bisect import heapq def input(): return sys.stdin.readline()[:-1] # sys.setrecursionlimit(1000000) # _INPUT = """2 # 1 2 # 2 4 # """ # sys.stdin = io.StringIO(_INPUT) INF = 10**10 N = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) wait = False q = [] result = [] for i in range(N): if A[i] < B[i]: for _ in range(B[i]-A[i]): q.append((i+1, 'R')) else: while q: result.append(q.pop()) for _ in range(A[i]-B[i]): result.append((i+1, 'L')) while q: result.append(q.pop()) print(len(result)) for i, c in result: print(i, c)