#include #include #include #include using namespace std; using ll=long long; const int MAXA=1000000; const int MAXN=200000; const int MAXM=200000; int a[MAXN+1], b[MAXN+1]; int main() { int n; cin>>n; for(int i=0; i>a[i]; for(int i=0; i>b[i]; int m=0; for(int i=0; i st; for(int i=0; ib[j] && (j==0 || a[j]-1!=a[j-1])){ printf("%d L\n", j+1); a[j]--; if(a[j]==b[j]) st.erase(j); break; } } } return 0; }