import sys if sys.platform =='ios': import clipboard a=clipboard.get() a = a.split('\n') text = '\n'.join(a) with open('input_file.txt','w') as f: f.write(text) sys.stdin = open('input_file.txt') n = int(input()) a = list(map(int,input().split())) b = list(map(int,input().split())) cnt = 0 for i in range(n): cnt += abs(a[i]-b[i]) print(cnt) i = 0 while a != b: if a[i] != b[i]: if a[i] < b[i]: a[i] += 1 print(i+1,"R") else: print(i+1,"L") a[i] -= 1 else: i += 1