n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) d = list(range(n)) ans = 0 rec = [] while d: for i in d: if a[i] == b[i]: d.pop(d.index(i)) continue if d.index(i) != 0: if a[d[d.index(i) - 1]] >= b[d[d.index(i)]]: continue if d.index(i) != len(d) - 1: if a[d[d.index(i) + 1]] <= b[d[d.index(i)]]: continue for j in range(abs(a[i] - b[i])): ans += 1 rec.append(str(i + 1) + ' ' + ('L' if a[i] > b[i] else 'R')) d.pop(d.index(i)) print(ans) print(*rec, sep='\n')