#include #define rep(i, n) for (int i = 0; i < (n); ++i) #define drep(i, n) for (int i = (n) - 1; i >= 0; --i) using std::cin; using std::cout; using std::vector; int main() { int n; cin >> n; vector a(n), b(n); rep(i, n) cin >> a[i]; rep(i, n) cin >> b[i]; int m = 0; rep(i, n) m += abs(a[i] - b[i]); cout << m << '\n'; rep(i, n)rep(j, a[i] - b[i]) cout << i + 1 << " L\n"; drep(i, n)rep(j, b[i] - a[i]) cout << i + 1 << " R\n"; return 0; }