#include #define rep(i, n) for (int i = 0; i < (n); ++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 cnt = 0; for (int i = n - 1; i >= 0; --i) { int p = i + 1; int d = a[i] - b[i]; if (!d) { cnt++; continue; } else if (d > 0) { while (d--) { cout << p << " " << "L\n"; p--; } } else { while (d++) { cout << p << " " << "R\n"; p++; } } } if (cnt == n) puts("0"); return 0; }