#include using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { cin.tie(nullptr)->sync_with_stdio(false); int n; cin >> n; vector a(n), b(n); rep(i, n) cin >> a[i]; rep(i, n) cin >> b[i]; vector> ans; rep(i, n) { while (a[i] < b[i]) ans.push_back({ i, 'R' }), a[i]++; while (a[i] > b[i]) ans.push_back({ i, 'L' }), a[i]--; } sort(ans.begin(), ans.end(), [](auto x, auto y) { if (x.second == y.second) { if (x.second == 'L') return x.first < y.first; return x.first > y.first; } return x.second < y.second; }); cout << ans.size() << '\n'; for (auto [i, c] : ans) cout << i + 1 << ' ' << c << '\n'; return 0; }