#include #include using namespace std; using namespace atcoder; using ll = long long; using ld = long double; using mint = modint998244353; int N, M, A[1010101], B[1010101], C[1010101]; int main() { cin >> N; for (int i = 1; i <= N; i++) { cin >> A[i]; } for (int i = 1; i <= N; i++) { cin >> B[i]; C[i] = B[i] - A[i]; M += abs(C[i]); } cout << M << endl; for (int i = N; i >= 1; i--) { if (C[i] > 0) { for (int j = 0; j < abs(C[i]); j++) { cout << i << ' ' << 'R' << endl; } } } for (int i = 1; i <= N; i++) { if (C[i] < 0) { for (int j = 0; j < abs(C[i]); j++) { cout << i << ' ' << 'L' << endl; } } } return 0; }