# yc1650 n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) lq = [] rq = [] for i in range(n): if a[i] < b[i]: rq.append(i) elif a[i] > b[i]: lq.append(i) m = 0 ans = [] for i in rq[::-1]: m += b[i]-a[i] for _ in range(b[i]-a[i]): ans.append(str(i+1)+" R") for i in lq: m += a[i]-b[i] for _ in range(a[i]-b[i]): ans.append(str(i+1)+" L") print(m) for i in ans: print(i)