#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <algorithm>
#include <utility>
#include <map>

using namespace std;
int n;
vector <int> best;

int bestnext(int i, vector <int> &ans, vector <int> &nxt) {
	int bst = i;
	if (nxt[i] >= 0) {
		int j = best[nxt[i]];
		if (j == 0)
			bst = 0;
		else if (ans[j - 1] < ans[i - 1])
			bst = j;
	}
	best[i] = bst;
	return bst;
}

int main() {
	ios::sync_with_stdio(false);
	//freopen("test.txt", "r", stdin);
	cin >> n;
	vector <int> h(n);
	best.resize(n, 0);
	for (int i = 0; i < n; ++i)
		cin >> h[i];
	vector <int> l(n), r(n), nxt(n);
	//-------

	for (int i = 0; i < n; ++i) {
		l[i] = i;
		while (l[i] - 1 >= 0 && l[i] - 1 > i - h[i]) {

			l[i] = l[l[i] - 1];
		}
	}
	for (int i = n - 1; i >= 0; --i) {
		nxt[i] = -1;

		r[i] = i;
		while (r[i] + 1 < n && r[i] + 1 < i + h[i]) {
			nxt[r[i] + 1] = i;
			r[i] = r[r[i] + 1];
		}
	} 
	//-------
	vector <int> ans(n), cutDest(n), prevCut(n);
	ans[0] = 1;
	int maxdist = -1;
	int rcuts = 1;
	int prev = -1;
	prevCut[0] = -1;

	for (int i = 1; i < n; ++i) {

		if (l[i] > 0)
			ans[i] = ans[l[i] - 1] + 1;
		else
			ans[i] = 1;
		cutDest[i] = -1;
		prevCut[i] = l[i] - 1;
		int bnxt = bestnext(i, ans, nxt);
		if (bnxt > 0 && ans[bnxt - 1] + 1 < ans[i]) {
			ans[i] = ans[bnxt - 1] + 1;
			cutDest[i] = 1;
			prevCut[i] = bnxt;
		}
		if (bnxt == 0) {
			ans[i] = 1;
			cutDest[i] = 1;
			prevCut[i] = bnxt;
		}

	}
	//for (int i = 0; i < n; ++i)
		//cout << r[i] << '\n';
	cout << ans[n - 1] << '\n';
	int now = n - 1;
	while (now >= 0) {
		if (cutDest[now] == 1) {
			cout << prevCut[now] + 1 << " R\n";
			now = prevCut[now] - 1;
		}
		else {
			cout << now + 1 << " L\n";
			now = prevCut[now];
		}
	}
	/*for (int i = 0; i < n; ++i)
		cout << ans[i] << '\n';*/
	return 0;
}
