#include long long int abs(long long int n) { if (n < 0) n *= -1; return n; } int main() { int n; scanf("%d", &n); int i; long long int a[200005], b[200005]; for (i = 0; i < n; i++) scanf("%lld", &a[i]); for (i = 0; i < n; i++) scanf("%lld", &b[i]); long long int cnt = 0; for (i = 0; i < n; i++) cnt += abs(a[i] - b[i]); printf("%lld\n", cnt); for (i = 0; i < n; i++) { while (a[i] < b[i]) { printf("%d R\n", i + 1); a[i]++; } while (a[i] > b[i]) { printf("%d L\n", i + 1); a[i]--; } } return 0; }