n = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) ans1 = [] ans2 = [] m = 0 for i, (a, b) in enumerate(zip(A, B)): d = a-b if d < 0: ans1 += [(i+1, 'R')]*abs(d) elif d > 0: ans2 += [(i+1, 'L')]*abs(d) m += abs(d) print(m) ans1.reverse() for k, c in ans1: print(k, c) for k, c in ans2: print(k, c)