#include #include using namespace std; using namespace atcoder; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(x) (x).begin(),(x).end() const long long MOD = 1000000007; const long long INF = 9*1e18; using ll = long long; using mint = modint1000000007; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b>N; vector A(N),B(N); vector sa(N); rep(i,N){ cin>>A[i]; } rep(i,N){ cin>>B[i]; } ll ans = 0; rep(i,N){ ans += abs(A[i]-B[i]); sa[i] = B[i]-A[i]; } cout << ans << endl; ll owatta = -1; rep(i,N){ if(sa[i] > 0){ continue; } else{ for(int k = A[i];k>B[i];k--){ cout << i+1 << " L" << endl; } for(int k = i-1;k>owatta;k--){ for(int p = A[k];powatta;i--){ for(int k = A[i];k