Ringo found a string $s$ of length $n$ in his yellow submarine. The string contains only lowercase letters from the English alphabet. As Ringo and his friends love palindromes, he would like to turn the string $s$ into a palindrome by applying two types of operations to the string. 

The first operation allows him to choose $i$ ($2 \le i \le n-1$) and to append the substring $s_2s_3 \ldots s_i$ ($i - 1$ characters) reversed to the front of $s$.

The second operation allows him to choose $i$ ($2 \le i \le n-1$) and to append the substring $s_i s_{i + 1}\ldots s_{n - 1}$ ($n - i$ characters) reversed to the end of $s$.

Note that characters in the string in this problem are indexed from $1$.

For example suppose $s=$abcdef. If he performs the first operation with $i=3$ then he appends cb to the front of $s$ and the result will be cbabcdef. Performing the second operation on the resulted string with $i=5$ will yield cbabcdefedc.

Your task is to help Ringo make the entire string a palindrome by applying any of the two operations (in total) at most $30$ times. The length of the resulting palindrome must not exceed $10^6$

It is guaranteed that under these constraints there always is a solution. Also note you do not have to minimize neither the number of operations applied, nor the length of the resulting string, but they have to fit into the constraints.


-----Input-----

The only line contains the string $S$ ($3 \le |s| \le 10^5$) of lowercase letters from the English alphabet.


-----Output-----

The first line should contain $k$ ($0\le k \le 30$)  — the number of operations performed.

Each of the following $k$ lines should describe an operation in form L i or R i. $L$ represents the first operation, $R$ represents the second operation, $i$ represents the index chosen.

The length of the resulting palindrome must not exceed $10^6$.


-----Examples-----
Input
abac

Output
2
R 2
R 5

Input
acccc

Output
2
L 4
L 2

Input
hannah

Output
0


-----Note-----

For the first example the following operations are performed:

abac $\to$ abacab $\to$ abacaba

The second sample performs the following operations: acccc $\to$ cccacccc $\to$ ccccacccc

The third example is already a palindrome so no operations are required.

Difficulty: MEDIUM
Tags: String algorithms

Constructive algorithms

Starter code:

Solutions:
import sys
input = sys.stdin.readline
s = input().strip()
print(4)
print('R', 2)
print('R', 2 * len(s) - 3)
print('L', 2 * len(s) - 2)
print('L', 2)


s = input()
n = len(s)
a = s[0]
b = s[-1]
print(3)
print('R', n - 1)
print('L', n)
print('L', 2)


import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
s = input().strip()
n = len(s)
an = [['L', n - 1], ['R', n - 1], ['R', n + n - 2 + 1]]
print(len(an))
for i in an:
	print(*i)


S = input()
print(3)
print('L 2')
print('R 2')
print('R', len(S) - 1 + 1 + len(S) - 1)


s = input()
n = len(s)
if n == 1:
	print(0)
else:
	print(3)
	print('R', 2)
	print('L', n)
	print('L', n - 1)


s = input()
n = len(s)
cur = len(s)
l = 0
l += cur
if s == s[::-1]:
	print(0)
else:
	print(4)
	print('R 2')
	l += cur - 2
	cur += cur - 2
	print('L 2')
	l += 1
	cur += 1
	print('R 2')
	l += cur - 2
	cur += cur - 2
	print('R', cur - 1)


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def msi():
	return map(str, input().strip().split(' '))

def li():
	return list(mi())

def dmain():
	sys.setrecursionlimit(1000000)
	threading.stack_size(1024000)
	thread = threading.Thread(target=main)
	thread.start()
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def getKey(item):
	return item[1]

def sort2(l):
	return sorted(l, key=getKey, reverse=True)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

def ceil(x, y):
	if x % y == 0:
		return x // y
	else:
		return x // y + 1

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def read():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def main():
	s = si()
	n = len(s)
	print(4)
	print('R', 2)
	n *= 2
	n -= 2
	print('L', 2)
	n += 1
	print('R', 2)
	n *= 2
	n -= 2
	print('R', n - 1)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


def solve(s):
	n = len(s)
	m = n
	print(6)
	for i in range(3):
		print('L', n - 1)
	p = (4 * n - 7) // 2 + 1
	print('R', p)
	n = 4 * n - 6 + p
	for i in range(2):
		print('R', n - (m - 2))
		n = n + (m - 2)
s = input()
solve(s)


l = len(input())
print(3)
print('R', l - 1)
print('L', l)
print('L', 2)


def process():
	li = list(input().strip())
	n = len(li)
	ops = []
	ops.append(('L', n - 1))
	n += n - 2
	ops.append(('L', 2))
	n += 1
	a = 1
	b = n - 2
	c = n
	ops.append(('L', c - 1))
	n += b
	a += b
	c += b
	ops.append(('R', a))
	n += b + 1
	ops.append(('R', n - b))
	n += b
	assert n <= 10 ** 6
	print(len(ops))
	for i in ops:
		print(i[0], i[1])
tests = 1
for i in range(tests):
	process()


s = input()
n = len(s)
print(4)
print('L', 2)
n += 1
print('R', n - 1)
n += 1
print('L', n - 1)
print('L', 2)


import os
import sys
from io import BytesIO, IOBase
import math

def main():
	pass
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def binary(n):
	return bin(n).replace('0b', '')

def decimal(s):
	return int(s, 2)

def pow2(n):
	p = 0
	while n > 1:
		n //= 2
		p += 1
	return p

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(i)
			n = n / i
	if n > 2:
		l.append(int(n))
	return l

def isPrime(n):
	if n == 1:
		return False
	else:
		root = int(n ** 0.5)
		root += 1
		for i in range(2, root):
			if n % i == 0:
				return False
		return True

def maxPrimeFactors(n):
	maxPrime = -1
	while n % 2 == 0:
		maxPrime = 2
		n >>= 1
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			maxPrime = i
			n = n / i
	if n > 2:
		maxPrime = n
	return int(maxPrime)

def countcon(s, i):
	c = 0
	ch = s[i]
	for i in range(i, len(s)):
		if s[i] == ch:
			c += 1
		else:
			break
	return c

def change(c1, c2, c3, c4):
	if c1 != c2:
		if c3 == c4:
			if c3 != c1:
				return [[2, 1]]
			else:
				return [[1, 2]]
		elif c1 == c3:
			return [[2, 1], [n, n - 1]]
		else:
			return [[2, 1], [n - 1, n]]
	elif c3 == c4:
		if c3 != c1:
			return []
		else:
			return [[1, 2], [2, 1]]
	elif c3 != c1:
		return [[n - 1, n]]
	else:
		return [[n, n - 1]]
s = input()
n = len(s)
print(3)
print('L 2')
n = n + 1
print('R 2')
n = 2 * n - 2
print('R ' + str(n - 1))


def palindrome(a):
	for i in range(len(a) // 2):
		if a[i] == a[len(a) - 1 - i]:
			pass
		else:
			return 0
	return 1
s = input()
if palindrome(s) == 0:
	print('3')
	print('R ' + str(len(s) - 1))
	s += s[-2]
	print('L ' + str(len(s) - 1))
	s = s[len(s) - 2:0:-1] + s
	print('L 2')
	s = s[1:0:-1] + s
else:
	print('0')


def main(input_f):
	str = input_f()
	n = len(str)
	print(3)
	print(f'R {n - 1}')
	print(f'L {n}')
	print(f'L {2}')
main(input)


t = 1
while t > 0:
	t -= 1
	s = input()
	n = len(s)
	print(3)
	print('R', n - 1)
	print('L', n)
	print('L', 2)


s = input()
len = len(s)
print(3)
print('L', len - 1)
print('R', len - 1)
print('R', 2 * len - 1)


print('3 \nL 2\nR 2\nR', 2 * len(input()) - 1)


import sys
from collections import defaultdict as dd
from collections import Counter as cc
from queue import Queue
import math
import itertools
try:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
except:
	pass
q = input()
w = len(q)
print(3)
print('L 2')
print('R 2')
print('R', 2 * w - 1)


a = input()
n = len(a)
print(3)
print('L 2')
print('R 2')
print('R {}'.format(2 * n - 1))


s = input()
n = len(s)
print(3)
print('L {}'.format(n - 1))
print('R {}'.format(n - 1))
print('R {}'.format(2 * n - 1))


import sys

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math
from collections import defaultdict
s = rs()
n = len(s)
wi(3)
print('R', n - 1)
print('L', n)
print('L', 2)


import sys, functools, collections, bisect, math, heapq
input = sys.stdin.readline
for _ in range(1):
	s = input().strip()
	n = len(s)
	print(3)
	print('R', n - 1)
	print('L', n)
	print('L', 2)


from math import *
from bisect import *
from collections import *
from random import *
from decimal import *
from itertools import *
import sys
input = sys.stdin.readline

def inp():
	return int(input())

def st():
	return input().rstrip('\n')

def lis():
	return list(map(int, input().split()))

def ma():
	return map(int, input().split())
t = 1
while t:
	t -= 1
	s = st()
	print(3)
	print('R', len(s) - 1)
	print('L', len(s))
	print('L', 2)


s = input()
n = len(s)
l = []
print(3)
print('R', 2)
print('L', n)
print('L', n - 1)


import math, sys, os
from io import BytesIO, IOBase
mod = 10 ** 9 + 7
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def minp():
	return map(int, sys.stdin.readline().rstrip().split())

def linp():
	return list(map(int, sys.stdin.readline().rstrip().split()))

def inp():
	return int(input())

def print_list(l):
	print(' '.join(map(str, l)))
a = list(input())
n = len(a)
t = n - 1
print(3)
print('R', t)
print('L', n)
print('L', 2)


s = input()
print(3)
n = len(s)
print(f'R {n - 1}')
print(f'L {n}')
print('L 2')


s = input()
print(3)

def L(s, i):
	print('L', i)
	return s[1:i][::-1] + s

def R(s, i):
	print('R', i)
	return s + s[i - 1:-1][::-1]
s = L(s, 2)
s = R(s, 2)
s = R(s, len(s) - 1)
assert s == s[::-1]


def L(s, k):
	return s[1:k][::-1] + s

def R(s, k):
	return s + s[k:-1][::-1]
s = input()
print(3)
print('R {}'.format(len(s) - 1))
s = R(s, len(s) - 2)
print('L {}'.format(len(s) - 1))
s = L(s, len(s) - 1)
print('L {}'.format(2))
s = L(s, 2)


from sys import stdin, stdout
import math
import heapq
import collections
input = stdin.readline

def inputnum():
	return int(input())

def inputnums():
	return map(int, input().split())

def inputlist():
	return list(map(int, input().split()))

def inputstring():
	return [x for x in input()]

def inputstrings():
	return [x for x in input().split()]

def inputstringnum():
	return [ord(x) - ord('a') for x in input()]

def inputmatrixchar(rows):
	arr2d = [[j for j in input().strip()] for i in range(rows)]
	return arr2d

def inputmatrixint(rows):
	arr2d = []
	for _ in range(rows):
		arr2d.append([int(i) for i in input().split()])
	return arr2d
s = inputstring()
n = len(s) - 1
print(3)
print('R', n - 1)
print('L', n)
print('L', 2)


s = input()
print(6)
print('L', 2)
s = s[1] + s
print('L', 2)
s = s[1] + s
print('L', 2)
s = s[1] + s
print('L', 2)
s = s[1] + s
print('R', 2)
s = s + s[1:-1][::-1]
print('R', len(s) - 1)
s = s + s[-2]
assert s == s[::-1]


s = input()
l = len(s)
print(3)
print('L 2')
print('R 2')
print('R ' + str(2 * l - 1))


arr = list(str(input()))
n = len(arr)
operation = []
print('3')
print('R ' + str(n - 1))
print('L ' + str(n))
print('L 2')


inp = input()

def is_palindrome(s):
	x = len(s)
	if x % 2 == 0:
		x //= 2
		if s[0:x] == s[x:][::-1]:
			return True
		else:
			return False
	else:
		x //= 2
		if s[0:x] == s[x + 1:]:
			return True
		else:
			return False

def L(s, i):
	return s[1:i][::-1] + s

def R(s, i):
	size_s = len(s)
	return s + s[i - 1:size_s - 1][::-1]
print(3)
x = len(inp)
print(f'L {x - 1}')
print(f'R {x - 1}')
print(f'R {2 * x - 1}')


n = len(input())
print(4)
print('R', 2)
print('R', 2 * n - 3)
print('L', 2 * n - 2)
print('L', 2)


from collections import Counter, OrderedDict
from itertools import permutations as perm
from collections import deque
from sys import stdin
from bisect import *
from heapq import *
import math
g = lambda : stdin.readline().strip()
gl = lambda : g().split()
gil = lambda : [int(var) for var in gl()]
gfl = lambda : [float(var) for var in gl()]
gcl = lambda : list(g())
gbs = lambda : [int(var) for var in g()]
mod = int(1000000000.0) + 7
inf = float('inf')
s = g()
n = len(s)
print(3)
print('L 2')
print('R 2')
print('R', 2 * n - 1)


def op1(i):
	global s
	print('L', i)
	s = s[1:i][::-1] + s

def op2(i):
	global s
	print('R', i)
	s = s + s[i - 1:len(s) - 1][::-1]
s = input()
print(3)
op1(2)
op2(2)
op2(len(s) - 1)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def RL():
	return map(int, sys.stdin.readline().rstrip().split())

def RLL():
	return list(map(int, sys.stdin.readline().rstrip().split()))

def N():
	return int(input())

def print_list(l):
	print(' '.join(map(str, l)))
s = input().strip()
n = len(s)
print(3)
print('L', 2)
print('R', 2)
print('R', 2 * n - 1)


import sys, math
import io, os
from bisect import bisect_left as bl, bisect_right as br, insort
from heapq import heapify, heappush, heappop
from collections import defaultdict as dd, deque, Counter

def data():
	return sys.stdin.readline().strip()

def mdata():
	return list(map(int, data().split()))

def outl(var):
	sys.stdout.write('\n'.join(map(str, var)) + '\n')

def out(var):
	sys.stdout.write(str(var) + '\n')
INF = float('inf')
mod = 10 ** 9 + 7
s = data()
print(4)
print('L', 2)
print('R', 2)
print('R', 2)
print('R', 4 * len(s) - 3)


from collections import defaultdict
mod = 10 ** 9 + 7
INF = float('inf')

def getlist():
	return list(map(int, input().split()))

def inverse(N, mod):
	return pow(N, mod - 2, mod)

def main():
	S = list(input())
	N = len(S)
	print(3)
	print('L', N - 1)
	print('R', N - 1)
	print('R', 2 * N - 1)
main()


import sys

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c for j in range(b)] for i in range(a)]

def list3d(a, b, c, d):
	return [[[d for k in range(c)] for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e for l in range(d)] for k in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 19
MOD = 10 ** 9 + 7
EPS = 10 ** (-10)
S = input()
N = len(S)
ans = []
ans.append(('R', N - 1))
ans.append(('L', N))
ans.append(('L', 2))
print(len(ans))
for a in ans:
	print(*a)


s = input()
length = len(s)
print(3)
print('L 2')
length += 1
print('R 2')
length += length - 2
print(f'R {length - 1}')


import sys
import math
from functools import reduce
import bisect

def getN():
	return int(input())

def getNM():
	return map(int, input().split())

def getList():
	return list(map(int, input().split()))

def input():
	return sys.stdin.readline().rstrip()

def index(a, x):
	i = bisect.bisect_left(a, x)
	if i != len(a) and a[i] == x:
		return i
	return False
s = input()
n = len(s)
s = s[1] + s
s = s[1] + s
n = len(s)
s += s[1:n - 1][::-1]
n = len(s)
print(4)
print('L 2')
print('L 2')
print(f'R {2}')
print(f'R {n - 1}')


import sys
input = sys.stdin.readline

def main():
	l = len(input()) - 1
	print('3')
	print('L 2')
	print('R 2')
	print('R', l * 2 - 1)
main()


from math import ceil, sqrt
for _ in range(1):
	str = input()
	n = len(str)
	print(3)
	print('R', n - 1)
	print('L', n)
	print('L', 2)


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import ceil, floor
from copy import *
from collections import deque, defaultdict
from collections import Counter as counter
from itertools import combinations
from itertools import permutations as permutate
from bisect import bisect_left as bl
from operator import *
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192
from sys import stderr

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
from types import GeneratorType

def iterative(f, stack=[]):
	print(stack)

	def wrapped_func(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		to = f(*args, **kwargs)
		while True:
			if type(to) is GeneratorType:
				stack.append(to)
				to = next(to)
				continue
			stack.pop()
			if not stack:
				break
			to = stack[-1].send(to)
		return to
	return wrapped_func
mod = 1000000007

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def fsep():
	return map(float, inp().split())

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def pow(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res
from functools import reduce

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))

def gcd(a, b):
	if a == b:
		return a
	while b > 0:
		(a, b) = (b, a % b)
	return a

def prefix_sum(ar):
	return list(accumulate(ar))

def suffix_sum(ar):
	return list(accumulate(ar[::-1]))[::-1]

def N():
	return int(inp())
from collections import defaultdict

def numberOfSetBits(i):
	i = i - (i >> 1 & 1431655765)
	i = (i & 858993459) + (i >> 2 & 858993459)
	return ((i + (i >> 4) & 252645135) * 16843009 & 4294967295) >> 24

def solve():
	s = inp()
	l = len(s)
	moves = []
	moves.append(('R', l - 1))
	s += s[-2]
	l += 1
	moves.append(('R', l - 1))
	s += s[-2]
	l += 1
	moves.append(('L', l - 1))
	s = s[1:-1][::-1] + s
	moves.append(('L', 2))
	s = s[1] + s
	print(4)
	for i in moves:
		print(*i)
solve()


import os
import sys
from io import BytesIO, IOBase

def main():
	pass
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()
s = input()
n = len(s)
print(3)
print('R', n - 1)
print('L', n)
print('L', 2)


import sys, bisect
arr = list(sys.stdin.readline().rstrip())
n = len(arr)
if arr == arr[::-1]:
	print(0)
else:
	print(4)
	print('R %d' % (n - 1))
	arr += [arr[-2]]
	n = len(arr)
	print('L %d' % 2)
	arr = [arr[1]] + arr
	n = len(arr)
	print('R %d' % 2)
	arr = arr + arr[1:n - 1][::-1]
	n = len(arr)
	print('R %d' % (n - 1))
	arr += [arr[-2]]


s = input()
t = s[:]
print(3)
print('L {0}'.format(len(s) - 1))
print('R {0}'.format(len(s) - 1))
print('R {0}'.format(2 * len(s) - 1))


import collections

def read():
	return list(map(int, input().strip().split()))
s = input()
n = len(s)
print(3)
print('L 2')
print('R 2')
print('R ' + str(2 * n - 1))


s = input()
l = len(s)
print('3\nL 2\nR 2\nR', end=' ')
print(l * 2 - 1)


a = input()
p = len(a)
print(3)
print('L 2')
print('R 2')
print(f'R {2 * p - 1}')


s = input()
n = len(s)
print(3)
print('R', n - 1, end=' ')
print()
print('L', n, end=' ')
print()
print('L', 2, end=' ')
print()


from collections import Counter
import string
import math
import sys
from fractions import Fraction

def array_int():
	return [int(i) for i in sys.stdin.readline().split()]

def vary(arrber_of_variables):
	if arrber_of_variables == 1:
		return int(sys.stdin.readline())
	if arrber_of_variables >= 2:
		return map(int, sys.stdin.readline().split())

def makedict(var):
	return dict(Counter(var))
testcases = 1
for _ in range(testcases):
	s = input()
	print(3)
	print('R', len(s) - 1)
	print('L', len(s))
	print('L', 2)


import sys
import math

def II():
	return int(sys.stdin.readline())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def MI():
	return map(int, sys.stdin.readline().split())

def SI():
	return sys.stdin.readline().strip()
s = list(SI())
n = len(s)
ans = []
ans.append(['L', 2])
n += 1
ans.append(['L', 3])
n += 2
ans.append(['R', 3])
n += n - 3
ans.append(['R', n - 2])
print(len(ans))
for i in ans:
	print(*i)


def ispal(s):
	n = len(s)
	for i in range(n // 2):
		if s[i] != s[n - i - 1]:
			return False
	return True
s = input()
n = len(s)
print(3)
print('R', n - 1)
print('L', n)
print('L', 2)


from sys import stdin
input = stdin.readline

def solve():
	s = input().strip()
	n = len(s)
	print(3)
	print(f'R {n - 1}')
	print(f'L {n}')
	print(f'L 2')
solve()


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def msi():
	return map(str, input().strip().split(' '))

def li():
	return list(mi())

def dmain():
	sys.setrecursionlimit(1000000)
	threading.stack_size(1024000)
	thread = threading.Thread(target=main)
	thread.start()
import sys
input = sys.stdin.readline
scanner = lambda : int(input())
string = lambda : input().rstrip()
get_list = lambda : list(read())
read = lambda : map(int, input().split())
get_float = lambda : map(float, input().split())

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def factorial(x, m):
	val = 1
	while x > 0:
		val = val * x % m
		x -= 1
	return val

def fact(x):
	val = 1
	while x > 0:
		val *= x
		x -= 1
	return val

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b // math.gcd(a, b)

def is_integer(n):
	return math.ceil(n) == math.floor(n)

def nCr(n, k):
	if k > n:
		return 0
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	if y == 0:
		return 1
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	(prime[0], prime[1]) = (False, False)
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def phi(n):
	result = n
	p = 2
	while p * p <= n:
		if n % p == 0:
			while n % p == 0:
				n = n // p
			result = result * (1.0 - 1.0 / float(p))
		p = p + 1
	if n > 1:
		result = result * (1.0 - 1.0 / float(n))
	return int(result)

def is_prime(n):
	if n == 0:
		return False
	if n == 1:
		return True
	for i in range(2, int(n ** (1 / 2)) + 1):
		if not n % i:
			return False
	return True

def next_prime(n, primes):
	while primes[n] != True:
		n += 1
	return n
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i
spf = [0 for i in range(MAXN)]

def factoriazation(x):
	res = []
	for i in range(2, int(x ** 0.5) + 1):
		while x % i == 0:
			res.append(i)
			x //= i
	if x != 1:
		res.append(x)
	return res

def factors(n):
	res = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			res.append(i)
			res.append(n // i)
	return list(set(res))

def int_array():
	return list(map(int, input().strip().split()))

def float_array():
	return list(map(float, input().strip().split()))

def str_array():
	return input().strip().split()

def binary_search(low, high, w, h, n):
	while low < high:
		mid = low + (high - low) // 2
		if check(mid, w, h, n):
			low = mid + 1
		else:
			high = mid
	return low

def check(moves, n):
	val = (moves + 1) // 2
	rem = moves - val
	sol = (val + 1) * (rem + 1)
	return sol < n

def sortSecond(val):
	return val[1]
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
alphs = 'abcdefghijklmnopqrstuvwxyz'
from itertools import permutations
import math
import bisect as bis
import random
import sys
import collections as collect
import functools as fnt
from decimal import Decimal

def solve():
	s = string()
	n = len(s)
	print(3)
	print('L', 2)
	n += 1
	print('R', 2)
	n += n - 2
	print('R', n - 1)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
t = 1
for i in range(t):
	solve()


from io import BytesIO, IOBase
import sys, os
inpl = lambda : list(map(int, input().split()))
inpm = lambda : map(int, input().split())
inpi = lambda : int(input())
inp = lambda : input()
(rev, ra, l) = (reversed, range, len)
P = print
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')
import sys, math
import statistics
st = inp()
P(3)
P('R {}'.format(len(st) - 1))
P('L {}'.format(len(st)))
P('L 2')


def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))
t = 1
for _ in range(t):
	s = str(input())
	print(3)
	print('L', 2)
	print('R', 2)
	print('R', 2 * len(s) - 1)


from sys import stdin
input = stdin.readline

def A():
	t = int(input())
	for _ in range(t):
		(a, b) = map(int, input().split())
		print(a ^ b)

def B():
	from collections import deque
	t = int(input())
	for _ in range(t):
		n = int(input())
		square = [0 for i in range(n)]
		for i in range(n):
			square[i] = list(input().rstrip())
		(a, b, c, d) = (square[0][1], square[1][0], square[n - 2][n - 1], square[n - 1][n - 2])
		ans = []
		if a == '0' and b == '0':
			if c == '0':
				ans.append([n - 2, n - 1])
			if d == '0':
				ans.append([n - 1, n - 2])
		elif a == '1' and b == '1':
			if c == '1':
				ans.append([n - 2, n - 1])
			if d == '1':
				ans.append([n - 1, n - 2])
		elif a == '1' and b == '0':
			if c == '1' and d == '1':
				ans.append([0, 1])
			elif c == '1' and d == '0':
				ans = [[0, 1], [n - 1, n - 2]]
			elif c == '0' and d == '1':
				ans = [[0, 1], [n - 2, n - 1]]
			elif c == '0' and d == '0':
				ans.append([1, 0])
		elif a == '0' and b == '1':
			if c == '1' and d == '1':
				ans.append([1, 0])
			elif c == '1' and d == '0':
				ans = [[0, 1], [n - 2, n - 1]]
			elif c == '0' and d == '1':
				ans = [[0, 1], [n - 1, n - 2]]
			elif c == '0' and d == '0':
				ans.append([0, 1])
		print(len(ans))
		for i in ans:
			print(i[0] + 1, i[1] + 1)

def C():
	s = input().rstrip()
	print(3)
	print('L', 2)
	print('R', 2)
	print('R', 2 * len(s) - 1)

def D():
	t = int(input())
	for _ in range(t):
		print(_)
C()


s = input()
n = len(s)
print(3)
print('R ' + str(n - 1))
print('L ' + str(n))
print('L 2')


import sys
LI = lambda : list(map(int, sys.stdin.readline().strip('\n').split()))
MI = lambda : map(int, sys.stdin.readline().strip('\n').split())
SI = lambda : sys.stdin.readline().strip('\n')
II = lambda : int(sys.stdin.readline().strip('\n'))
s = SI()
n = len(s)
print(3)
print('R', n - 1)
print('L', n)
print('L', 2)


def palindrom(a):
	if a == a[::-1]:
		return True
	else:
		return False

def left(a, num):
	a = a[1:num][::-1] + a
	return a

def right(a, num):
	a = a + a[len(a) - 2:len(a) - 1][::-1]
	return a
st = input()
number = 0
ans = []
while palindrom(st) == False:
	ans.append('R ' + str(len(st) - 1))
	st = right(st, len(st) - 1)
	ans.append('L ' + str(len(st) - 1))
	st = left(st, len(st) - 1)
	ans.append('L ' + str(2))
	st = left(st, 2)
	number = 3
print(number)
for p in range(number):
	print(ans[p])


from sys import stdin
string = stdin.readline().strip()
first = string[0]
end = string[-1]
length = len(string)
print(3)
print('L', 2)
print('R', 2)
print('R', 2 * length - 1)


from os import path
import sys
from heapq import heappush, heappop
from functools import cmp_to_key as ctk
from collections import deque, defaultdict as dd
from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right
from itertools import permutations
from datetime import datetime
from math import ceil, sqrt, log, gcd

def ii():
	return int(input())

def si():
	return input().rstrip()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
abc = 'abcdefghijklmnopqrstuvwxyz'
mod = 998244353
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def bo(i):
	return ord(i) - ord('a')

def ceil1(a, b):
	return (a + b - 1) // b

def solve():
	s = si()
	print(3)
	n = len(s)
	print('L', 2)
	print('R', 2)
	print('R', 2 * n - 1)
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
else:
	input = sys.stdin.readline
solve()


s = input()
n = len(s)
print(3)
print('L', 2)
n += 1
print('R', 2)
k = n - 2
n += k
print('R', n - 1)


import math as mt
import bisect
import sys
import collections
import heapq
t = 1
p = 10 ** 9 + 7

def ncr_util():
	inv[0] = inv[1] = 1
	fact[0] = fact[1] = 1
	for i in range(2, 300001):
		inv[i] = inv[i % p] * (p - p // i) % p
	for i in range(1, 300001):
		inv[i] = inv[i - 1] * inv[i] % p
		fact[i] = fact[i - 1] * i % p

def solve():
	print(3)
	print('L', len(s) - 1)
	print('R', len(s) - 1)
	print('R', 2 * len(s) - 1)
for _ in range(t):
	s = input()
	solve()


s = input()
n = len(s)
s = s[1:-1][::-1] + s
s = s + s[n - 2:-1][::-1]
s = s + s[2 * n - 2:-1][::-1]
print(3)
print('L %d' % (n - 1))
print('R %d' % (n - 1))
print('R %d' % (2 * n - 1))


s = input()
print('3\nR {}\nL {}\nL 2'.format(len(s) - 1, len(s), 2))


import io
import os
import sys
import math
import heapq
input = sys.stdin.readline
mod = 10 ** 9 + 7
s = input().rstrip()
n = len(s)
print(3)
print('L', 2)
print('R', 2)
n += 1
n *= 2
n -= 2
print('R', n - 1)


LEFT = 0
RIGHT = 1

def sim(s, t, i):
	assert 1 <= i < len(s) - 1
	if t == LEFT:
		p = s[1:i + 1]
		return p[::-1] + s
	else:
		p = s[i:-1]
		return s + p[::-1]

def solve(s):
	res = [(RIGHT, len(s) - 2), (RIGHT, len(s) - 1), (LEFT, len(s)), (LEFT, 1)]
	return res

def main():
	s = input().strip()
	r = solve(s)
	print(len(r))
	for (typ, i) in r:
		print('R' if typ == RIGHT else 'L', i + 1)

def test():
	print(solve('abcd'))
main()


stt = input()
print(3)
x = 'L'
y = 'R'
print(x, 2)
print(y, 2)
print(y, 2 * len(stt) - 1)


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def fi():
	return float(input())

def si():
	return input()

def msi():
	return map(str, input().split())

def mi():
	return map(int, input().split())

def li():
	return list(mi())

def read():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def lcm(x, y):
	return x * y // gcd(x, y)
mod = 1000000007

def modInverse(b, m):
	g = gcd(b, m)
	if g != 1:
		return -1
	else:
		return pow(b, m - 2, m)

def ceil(x, y):
	if x % y == 0:
		return x // y
	else:
		return x // y + 1

def modu(a, b, m):
	a = a % m
	inv = modInverse(b, m)
	if inv == -1:
		return -999999999
	else:
		return inv * a % m
from math import log, sqrt, factorial, cos, tan, sin, radians, floor
import bisect
from decimal import *
getcontext().prec = 8
abc = 'abcdefghijklmnopqrstuvwxyz'
pi = 3.141592653589793

def fn(n):
	c = 0
	while n % 2 == 0:
		c += 1
		n //= 2
	return c

def main():
	s = si()
	print(3)
	n = len(s)
	print('L', n - 1)
	print('R', n - 1)
	print('R', 2 * n - 1)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import sys
input = lambda : sys.stdin.readline().rstrip()
s = input()
x1 = ['L', len(s) - 1]
x2 = ['R', len(s) - 1]
x3 = ['R', 2 * len(s) - 1]
print(3)
print(*x1)
print(*x2)
print(*x3)


n = len(input())
print(3)
print('L', 2)
print('R', 2)
print('R', 2 * n - 1)


import sys
input = sys.stdin.readline
s = input()[:-1]
print(4)
print('R', 2)
print('L', 2)
print('R', 2)
print('R', 4 * len(s) - 5)


import sys
input = sys.stdin.readline

def main():
	S = input().strip()
	if S == S[::-1]:
		print(0)
		return
	print(3)
	print('L', 2)
	print('R', 2)
	l = 2 * len(S) - 1
	print('R', l)
main()


s = str(input())
print(4)
print('R', 2)
k = 2 * len(s) - 2
print('R', k - 1)
print('L', k)
print('L', 2)


import sys, os.path
from collections import *
from heapq import *
from copy import *
import math
mod = 10 ** 9 + 7
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
s = input()
n = len(s)
print(3)
print('L', 2)
print('R', 2)
print('R', 2 * n - 1)


import sys, bisect, string, math, time, functools, random, fractions
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
from itertools import permutations, combinations, groupby
rep = range
R = range

def Golf():
	(n, *t) = map(int, open(0).read().split())

def I():
	return int(input())

def S_():
	return input()

def IS():
	return input().split()

def LS():
	return [i for i in input().split()]

def MI():
	return map(int, input().split())

def LI():
	return [int(i) for i in input().split()]

def LI_():
	return [int(i) - 1 for i in input().split()]

def NI(n):
	return [int(input()) for i in range(n)]

def NI_(n):
	return [int(input()) - 1 for i in range(n)]

def NLI(n):
	return [[int(i) for i in input().split()] for i in range(n)]

def NLI_(n):
	return [[int(i) - 1 for i in input().split()] for i in range(n)]

def StoLI():
	return [ord(i) - 97 for i in input()]

def ItoS(n):
	return chr(n + 97)

def LtoS(ls):
	return ''.join([chr(i + 97) for i in ls])

def RA():
	return map(int, open(0).read().split())

def RLI(n=8, a=1, b=10):
	return [random.randint(a, b) for i in range(n)]

def RI(a=1, b=10):
	return random.randint(a, b)

def INP():
	N = 10
	A = 10
	n = random.randint(1, N)
	a = [random.randint(1, A) for i in range(n)]
	return (n, a)

def Rtest(T):
	(case, err) = (0, 0)
	for i in range(T):
		inp = INP()
		a1 = naive(*inp)
		a2 = solve(*inp)
		if a1 != a2:
			print((a1, a2), inp)
			err += 1
		case += 1
	print('Tested', case, 'case with', err, 'errors')

def GI(V, E, ls=None, Directed=False, index=1):
	org_inp = []
	g = [[] for i in range(V)]
	FromStdin = True if ls == None else False
	for i in range(E):
		if FromStdin:
			inp = LI()
			org_inp.append(inp)
		else:
			inp = ls[i]
		if len(inp) == 2:
			(a, b) = inp
			c = 1
		else:
			(a, b, c) = inp
		if index == 1:
			a -= 1
			b -= 1
		aa = (a, c)
		bb = (b, c)
		g[a].append(bb)
		if not Directed:
			g[b].append(aa)
	return (g, org_inp)

def GGI(h, w, search=None, replacement_of_found='.', mp_def={'#': 1, '.': 0}, boundary=1):
	mp = [boundary] * (w + 2)
	found = {}
	for i in R(h):
		s = input()
		for char in search:
			if char in s:
				found[char] = (i + 1) * (w + 2) + s.index(char) + 1
				mp_def[char] = mp_def[replacement_of_found]
		mp += [boundary] + [mp_def[j] for j in s] + [boundary]
	mp += [boundary] * (w + 2)
	return (h + 2, w + 2, mp, found)

def TI(n):
	return GI(n, n - 1)

def accum(ls):
	rt = [0]
	for i in ls:
		rt += [rt[-1] + i]
	return rt

def bit_combination(n, base=2):
	rt = []
	for tb in R(base ** n):
		s = [tb // base ** bt % base for bt in R(n)]
		rt += [s]
	return rt

def gcd(x, y):
	if y == 0:
		return x
	if x % y == 0:
		return y
	while x % y != 0:
		(x, y) = (y, x % y)
	return y

def YN(x):
	print(['NO', 'YES'][x])

def Yn(x):
	print(['No', 'Yes'][x])

def show(*inp, end='\n'):
	if show_flg:
		print(*inp, end=end)
mo = 10 ** 9 + 7
inf = float('inf')
FourNb = [(-1, 0), (1, 0), (0, 1), (0, -1)]
EightNb = [(-1, 0), (1, 0), (0, 1), (0, -1), (1, 1), (-1, -1), (1, -1), (-1, 1)]
compas = dict(zip('WENS', FourNb))
cursol = dict(zip('LRUD', FourNb))
l_alp = string.ascii_lowercase
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
input = lambda : sys.stdin.readline().rstrip()
show_flg = False
show_flg = True
ans = 0

def t(c, x):
	n = len(x)
for _ in range(1):
	s = input()
	n = len(s)
	print(5)
	print('L 2')
	n += 1
	print('L 3')
	n += 2
	print('R 2')
	n += n - 2
	print('L', n - 1)
	print('L 2')


from sys import stdin, stdout
from math import floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from collections import defaultdict as dd, deque
from heapq import merge, heapify, heappop, heappush, nsmallest
from bisect import bisect_left as bl, bisect_right as br, bisect
mod = pow(10, 9) + 7
mod2 = 998244353

def inp():
	return stdin.readline().strip()

def out(var, end='\n'):
	stdout.write(str(var) + '\n')

def outa(*var, end='\n'):
	stdout.write(' '.join(map(str, var)) + end)

def lmp():
	return list(mp())

def mp():
	return map(int, inp().split())

def smp():
	return map(str, inp().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]

def remadd(x, y):
	return 1 if x % y else 0

def ceil(a, b):
	return (a + b - 1) // b

def isprime(x):
	if x <= 1:
		return False
	if x in (2, 3):
		return True
	if x % 2 == 0:
		return False
	for i in range(3, int(sqrt(x)) + 1, 2):
		if x % i == 0:
			return False
	return True
s = inp()
l = len(s)
print(3)
print('L', 2)
l += 1
print('R', 2)
l = 2 * l - 2
print('R', l - 1)


import sys
sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7

def resolve():
	S = list(input())
	n = len(S)
	print(3)
	print('R', n - 1)
	n += 1
	print('L', n - 1)
	print('L', 2)
resolve()


s = input()
l = len(s)
print(3)
print(f'R {l - 1}')
print(f'L {l}')
print(f'L {2}')


from sys import stdin, stdout
st = lambda : list(stdin.readline().strip())
li = lambda : list(map(int, stdin.readline().split()))
mp = lambda : map(int, stdin.readline().split())
inp = lambda : int(stdin.readline())
pr = lambda n: stdout.write(str(n) + '\n')
mod = 1000000007

def solve():
	s = st()
	pr(3)
	n = len(s)
	print('L', 2)
	print('R', 2)
	print('R', 2 * n - 1)
for _ in range(1):
	solve()


s = input()
r = s[::-1]
if s == r:
	print(0)
else:
	n = len(s)
	n = n - 1
	print(4)
	print(f'L {n}')
	ns = s[1:n]
	ns = ns[::-1]
	s = ns + s
	n = len(s)
	n = n - 1
	print(f'R {n}')
	s = s + s[-2]
	n = len(s)
	n = n - 1
	print(f'L {n}')
	ns = s[1:n]
	ns = ns[::-1]
	s = ns + s
	n = len(s)
	n = n - 1
	print('L 2')
	s = s[1] + s


import math
import sys, bisect
from heapq import *
from itertools import *
from collections import *
sys.setrecursionlimit(10 ** 6)
I = lambda : int(sys.stdin.readline())
neo = lambda : map(int, sys.stdin.readline().split())
Neo = lambda : list(map(int, sys.stdin.readline().split()))
s = input()
if s == s[::-1]:
	print(0)
	exit()
print(4)
print('L', len(s) - 1)
s = s[1:-1][::-1] + s
t = len(s) - 1
print('L', t)
s = s[1:-1][::-1] + s
print('R', len(s) - t)
s = s + s[-t - 1:-1][::-1]
t -= 1
print('R', len(s) - t)
s = s + s[-t - 1:-1][::-1]


def main():
	s = input()
	count = len(s)
	print(3)
	print('L', 2)
	count += 1
	print('R', 2)
	count += count - 2
	print('R', count - 1)
main()


import os
import sys
from math import *
from collections import *
from heapq import *
from bisect import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
ALPHA = 'abcdefghijklmnopqrstuvwxyz/'
M = 1000000007
EPS = 1e-06

def Ceil(a, b):
	return a // b + int(a % b > 0)

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
s = input()
n = len(s)
l = n
print(4)
print('L', n - 1)
l += n - 2
print('L', n - 1)
l += n - 2
print('R', n - 1)
l += l - 1 - n + 2
print('R', l - (n - 2))


def solve(s):
	print(3)
	print('L {}'.format(2))
	l = len(s) + 1
	print('R {}'.format(2))
	l += l - 2
	print('R {}'.format(l - 1))
s = input()
solve(s)


st = input()
print(3)
print('L 2')
print('R 2')
print('R', end=' ')
print(2 * len(st) - 1)


import sys
from random import *
pl = 1
from copy import *
if pl:
	input = sys.stdin.readline
else:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('outpt.txt', 'w')

def li():
	return [int(xxx) for xxx in input().split()]

def fi():
	return int(input())

def si():
	return list(input().rstrip())

def mi():
	return map(int, input().split())
t = 1
while t > 0:
	t -= 1
	s = input().rstrip()
	n = len(s)
	print(4)
	print('L', n - 1)
	s = s[1:n - 1][::-1] + s
	print('L', 2)
	s = s[1] + s
	print('R', 2)
	s = s + s[1:len(s) - 1][::-1]
	print('R', len(s) - 1)
	s = s + s[len(s) - 2]


from sys import stdin, stdout
for _ in range(1):
	s = input()
	n = len(s)
	print(3)
	print('L', 2)
	print('R', 2)
	print('R', 2 * n - 1)


import math

def solve():
	s = input()
	n = len(s)
	print(3)
	print('R', n - 1)
	print('L', n)
	print('L 2')
for z in range(1):
	solve()


import sys

def gt():
	return list(map(int, input().split()))
s = input()
n = len(s)
print(3)
print(f'R {n - 1}\nL {n}\nL 2')


def modinv(n, p):
	return pow(n, p - 2, p)

def main():
	s = input()
	n = len(s)
	print(4)
	print('R', n - 1)
	n += 1
	print('L', n - 2)
	n += n - 3
	print('L', n - 1)
	n += n - 2
	print('L', 2)
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			self.write = lambda s: self.buffer.write(s.encode('ascii'))
			self.read = lambda : self.buffer.read().decode('ascii')
			self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import sys
import bisect
from bisect import bisect_right
import math
from sys import stdin, stdout

def sieve(N):
	primeNumbers = [True] * (N + 1)
	primeNumbers[0] = False
	primeNumbers[1] = False
	i = 2
	while i * i <= N:
		j = i
		if primeNumbers[j]:
			while j * i <= N:
				primeNumbers[j * i] = False
				j += 1
		i += 1
	return primeNumbers

def getPrime(N):
	primes = sieve(N)
	result = []
	for i in range(len(primes)):
		if primes[i]:
			result.append(i)
	return result

def factor(N):
	factors = []
	i = 1
	while i * i <= N:
		if N % i == 0:
			factors.append(i)
			if i != N // i:
				factors.append(N // i)
		i += 1
	return sorted(factors)

def gcd(a, b):
	if a < b:
		return gcd(b, a)
	if b == 0:
		return a
	return gcd(b, a % b)

def extendedGcd(a, b):
	if a < b:
		return extendedGcd(b, a)
	if b == 0:
		return [a, 1, 0]
	res = extendedGcd(b, a % b)
	x = res[2]
	y = res[1] - math.floor(a / b) * res[2]
	res[1] = x
	res[2] = y
	return res

def iterativeModularFunc(a, b, c):
	res = 1
	while b > 0:
		if b & 1:
			res = res * a % c
		a = a * a % c
		b = b // 2
	return res

def get_ints_in_variables():
	return map(int, sys.stdin.readline().strip().split())

def get_int():
	return int(sys.stdin.readline())

def get_ints_in_list():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_list_of_list(n):
	return [list(map(int, sys.stdin.readline().strip().split())) for _ in range(n)]

def get_string():
	return sys.stdin.readline().strip()

def Solution(s):
	print(3)
	print('R', len(s) - 1)
	print('L', len(s))
	print('L', 2)

def main():
	Solution(get_string())
main()


import sys
from typing import List
sys.setrecursionlimit(10 ** 9)

def lmi():
	return list(map(int, input().split()))

def main():
	S = input()
	result = solve(S)
	print(len(result))
	for line in result:
		print(*line)

def solve(S: str) -> list:
	N = len(S)
	ans = [['R', N - 1], ['R', N], ['L', N + 1], ['L', 2]]
	return ans
main()


word = input()
n = len(word)
print(3)
print('L 2')
print('R 2')
print(f'R {2 * n - 1}')


from sys import stdin, stdout
import math, sys, heapq
from itertools import permutations, combinations
from collections import defaultdict, deque, OrderedDict
from os import path
import random
import bisect as bi

def yes():
	print('YES')

def no():
	print('NO')
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

	def I():
		return int(input())

	def In():
		return map(int, input().split())
else:

	def I():
		return int(stdin.readline())

	def In():
		return map(int, stdin.readline().split())

def dict(a):
	d = {}
	for x in a:
		if d.get(x, -1) != -1:
			d[x] += 1
		else:
			d[x] = 1
	return d

def find_gt(a, x):
	i = bi.bisect_left(a, x)
	if i != len(a):
		return i
	else:
		return -1

def main():
	try:
		s = input()
		print(3)
		print('R', 2)
		print('L', len(s))
		print('L', len(s) - 1)
	except:
		pass
M = 998244353
P = 1000000007
for _ in range(1):
	main()


Str = input()
print(3)
print('L', 2)
print('R', 2)
print('R', 2 * len(Str) - 1)


n = len(input())
print('3\nL 2\nR 2\nR {}'.format(2 * n - 1))


s = input()
l = len(s)
ans = []
ans.append(['R', l - 1])
l += 1
ans.append(['R', l - 1])
l += 1
ans.append(['L', l - 1])
l = l + l - 2
ans.append(['L', 2])
print(len(ans))
for g in ans:
	print(*g)


a = input()
b = len(a)
print(3)
print('R', b - 1)
print('L', b)
print('L', 2)


from collections import deque
from collections import OrderedDict
from queue import PriorityQueue
import math
import sys
import os
import threading
import bisect
import operator
import queue
import heapq
from atexit import register
from io import BytesIO
import io
from sys import stdin, stdout
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
input = lambda : sys.stdin.readline().rstrip('\r\n')

def isPolinom(s):
	n = len(s)
	for i in range(len(s) // 2):
		if s[i] != s[n - i - 1]:
			return False
	else:
		return True
s = input()
if isPolinom(s) == True:
	print(0)
	sys.exit(0)
n = len(s)
print(4)
print('L', n - 1)
print('L', 2)
print('R', 2)
f = (n + (n - 2) + 1) * 2 - 3
print('R', f)


import os
import sys
from io import BytesIO, IOBase
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def main():
	try:
		string = list(input())
		if string == sorted(string, reverse=True):
			print('0')
			exit()
		n = len(string)
		print('3')
		if n % 2 == 0:
			print('R 2')
			print('L {}'.format(n))
			print('L {}'.format(n - 1))
		else:
			print('R {}'.format(n - 1))
			print('L {}'.format(n))
			print('L {}'.format(2))
	except Exception as e:
		print(e)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import sys

def minp():
	return sys.stdin.readline().strip()

def mint():
	return int(minp())

def mints():
	return list(map(int, minp().split()))

def solve():
	s = minp()
	n = len(s)
	print(3)
	print('R', n - 1)
	print('L', n)
	print('L', 2)
solve()


import sys
input = sys.stdin.readline
s = input().rstrip()
n = len(s)
t = s[::-1]
ans = []
if s == t:
	print(0)
	exit()
print(3)
print('L', 2)
print('R', 2)
print('R', 2 * n - 1)


import sys
s = sys.stdin.readline().strip()
l = len(s)
print(3)
print('L', l - 1)
print('R', l - 1)
print('R', 2 * l - 1)


import io
import os
from collections import Counter, defaultdict, deque

def solve(S):
	ops = []

	def L(i):
		nonlocal S
		assert i != 1 and i != len(S)
		ops.append('L ' + str(i))
		sub = S[1:i][::-1]
		S = sub + S

	def R(i):
		nonlocal S
		assert i != 0 and i != len(S) - 1
		ops.append('R ' + str(i + 1))
		sub = S[i:-1][::-1]
		S = S + sub
	X = len(S) - 2
	L(len(S) - 1)
	R(X)
	R(2 * X + 2)
	assert S == S[::-1]
	assert len(S) <= 10 ** 6
	return str(len(ops)) + '\n' + '\n'.join(ops)
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
S = input().decode().strip()
ans = solve(S)
print(ans)


import sys
INP = lambda : sys.stdin.readline().strip()
INT = lambda : int(INP())
MAP = lambda : map(int, INP().split())
ARR = lambda : [int(i) for i in INP().split()]

def JOIN(arr, x=' '):
	return x.join([str(i) for i in arr])

def EXIT(x='NO'):
	print(x)
	exit()
s = INP()
n = len(s)
print(3)
print('L', n - 1)
print('R', n - 1)
print('R', 2 * n - 1)


s = input()
b = []
for j in s:
	b.append(j)
n = len(b)
print(3)
print('R', n - 1)
print('L', n)
print('L', 2)


import sys

def main():
	s = input()
	n = len(s)
	print(3)
	print('L', 2)
	print('R', 2)
	print('R', 2 * n - 1)
main()


import os
import sys
from io import BytesIO, IOBase
import threading
from bisect import bisect_right
from math import gcd, log
from collections import Counter
from pprint import pprint
from itertools import combinations

def main():
	s = input()
	n = len(s)
	print(3)
	print('L', n - 1)
	print('R', n - 2 + 1)
	print('R', n - 2 + 1 + n - 2 + 1 + 1)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for _ in range(1):
	main()


from sys import stdin, gettrace
if gettrace():
	inputi = input
else:

	def input():
		return next(stdin)[:-1]

	def inputi():
		return stdin.buffer.readline()

def main():
	ss = input()
	n = len(ss)
	print(3)
	print('L', n - 1)
	print('R', n - 1)
	print('R', 2 * n - 1)
main()


def solve():
	s = input()
	N = len(s)
	print(3)
	print('L', 2)
	print('R', 2)
	N += 1 + (N - 1)
	print('R', N - 1)
t = 1
for _ in range(t):
	solve()


def main():
	s = input()
	if s == s[::-1]:
		print(0)
		return
	ls = len(s)
	print(3)
	print('L 2')
	ls += 1
	print('R 2')
	ls += ls - 2
	print('R ' + str(ls - 1))
main()


from collections import Counter
import math
import sys
from bisect import bisect, bisect_left, bisect_right
from itertools import permutations

def input():
	return sys.stdin.readline().strip()

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def mod():
	return 10 ** 9 + 7
s = input()
n = len(s)
print(3)
print('L', 2)
print('R', 2)
print('R', 2 * n - 1)


s = input()
n = len(s)
print(3)
print('L 2')
print('R 2')
print('R %i' % (2 * n - 1))


import sys
input = sys.stdin.readline

def printnl(val):
	sys.stdout.write(str(val) + '\n')

def solve(s):
	R = 'R'
	L = 'L'
	n = len(s)
	printnl('3\nR %d\nL %d\nL 2' % (n - 1, n))
s = input().rsplit()[0]
solve(s)


import os
from io import BytesIO, IOBase
import sys
from collections import defaultdict, deque, Counter
from bisect import *
from math import sqrt, pi, ceil
import math
from itertools import permutations
from copy import deepcopy

def main():
	s = input().rstrip()
	b = s[::-1]
	n = len(s)
	if s == b:
		print(0)
	else:
		print(4)
		print('L', 2)
		print('R', n)
		print('R', 2)
		print('R', 2 * n + 1)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import sys
import math
import random
from typing import List
input = sys.stdin.readline

def is_palindrome(s):
	N = len(s)
	for i in range(N // 2):
		if s[i] != s[N - 1 - i]:
			return False
	return True

def go(steps, s):
	if is_palindrome(s):
		print(' ' * steps, s, steps)
		print(' ->\n'.join(A))
	if steps >= 3:
		return
	N = len(s)
	for i in range(1, N - 1):
		next_s = ''.join(reversed(s[1:i + 1])) + s
		A.append(next_s)
		go(steps + 1, next_s)
		A.pop()
	for i in range(1, N - 1):
		next_s = s + ''.join(reversed(s[i:N - 1]))
		A.append(next_s)
		go(steps + 1, next_s)
		A.pop()
S = input().strip()
N = len(S)
print(3)
print('L 2')
print('R 2')
print('R %d' % (2 * N - 1))


t = 1
for _ in range(t):
	s = input()
	f = len(s) - 2
	print(3)
	print('L', len(s) - 1)
	s = s[1:len(s) - 1][::-1] + s
	print('R', len(s) - len(s) // 2)
	s = s + s[len(s) // 2 - 1:len(s) - 1][::-1]
	print('R', len(s) - f)
	s = s + s[len(s) - f - 1:len(s) - 1][::-1]


s = input()
n = len(s)
print(4)
print('R', 2)
a = s[1:-1]
a = a[::-1]
s = s + a
print('L', 2)
s = s[1] + s
print('R', 2)
a = s[1:-1]
a = a[::-1]
s = s + a
print('R', len(s) - 1)
s = s + s[-2]
x = len(s)


S = input()
N = len(S)
print(3)
print(f'L {2}')
print(f'R {2}')
print(f'R {2 * N - 1}')


import sys
input = sys.stdin.readline
from collections import defaultdict as dc
from bisect import bisect_right
s = input()[:-1]
n = len(s)
print(3)
print('R', n - 1)
print('L', n)
print('L', 2)


from sys import stdin
s = stdin.readline()
n = len(s) - 1
print(4)
print('L', n - 1)
print('L', 2)
print('R', 2)
print('R', 4 * n - 5)


def left(string, i):
	i = i - 1
	substring = string[i:0:-1]
	return substring + string

def right(string, i):
	i = i - 1
	substring = string[len(string) - 2:i - 1:-1]
	return string + substring

def isPalindrome(string):
	front = 0
	back = len(string) - 1
	while front < back:
		if string[front] != string[back]:
			return False
		front += 1
		back -= 1
	return True

def main():
	inp = input()
	if isPalindrome(inp):
		print(0)
	elif len(inp) == 3:
		print(3)
		print('L', 2)
		print('R', 2)
		print('R', 5)
	else:
		n = len(inp)
		b = n - 3 + (n - 1) + n
		print(3)
		print('L', n - 2)
		print('R', n - 2)
		print('R', b - (n - 3))
main()


def pal_check(s):
	if s[0:len(s) // 2] == s[:len(s) // 2 - (len(s) + 1) % 2:-1]:
		return 1
	return 0
st = input()
if pal_check(st):
	print(0)
else:
	print(4)
	print('R', len(st) - 1)
	print('L', 2)
	print('R', 2)
	print('R', 2 * len(st) + 1)


s = input().strip()
ct = len(s)
print(4)
print('L', 2)
print('L', 2)
ct += 2
print('R', 2)
ct += len(s)
print('R', ct - 1)


from sys import stdin, stdout
from math import gcd
input = stdin.readline
s = input()
print(3)
print('L', 2)
print('R', 2)
print('R', 2 * (len(s) - 1) - 1)


s = input()
n = len(s)
print(f'3\nR {n - 1}\nL {n}\nL 2')


import math
s = input()
l = len(s)
s = list(s)
print(4)
print('R', 2, end=' ')
for j in range(1, l - 1):
	s.append(s[l - j - 1])
print()
print('L', 2, end=' ')
print()
s.insert(0, s[1])
print('R', 2, end=' ')
print()
l = len(s)
for j in range(1, l - 1):
	s.append(s[l - j - 1])
print('R', len(s) - 1, end=' ')
print()
s.append(s[-2])


import sys as _sys

def main():
	n = len(_read_line())
	assert n >= 3
	operations_n = 3
	print(operations_n)
	print('R', n - 1)
	print('L', n)
	print('L', 2)

def _read_line():
	result = _sys.stdin.readline()
	assert result[-1] == '\n'
	return result[:-1]

def _read_ints():
	return map(int, _read_line().split())
main()


s = input()
print(4)
n = len(s)
x = 4 * n - 5
for _ in range(1):
	print('R', 2)
	print('L', 2)
	print('R', 2)
	print('R', x)


import math
n = input()
l = len(n)
print(3)
print('L', 2)
print('R', 2)
l += l
print('R', l - 1)


import math
s = input()
n = len(s)
print(4)
print('L 2')
print('R ' + str(n))
print('L ' + str(n + 1))
print('L 2')


import time, math as mt, bisect, sys
from sys import stdin, stdout
from collections import deque
from fractions import Fraction
from collections import Counter
from collections import OrderedDict
pi = 3.141592653589793

def II():
	return int(stdin.readline())

def IO():
	return stdin.readline()

def IP():
	return map(int, stdin.readline().split())

def L():
	return list(map(int, stdin.readline().split()))

def P(x):
	return stdout.write(str(x) + '\n')

def PI(x, y):
	return stdout.write(str(x) + ' ' + str(y) + '\n')

def lcm(a, b):
	return a * b // gcd(a, b)

def gcd(a, b):
	if a == 0:
		return b
	elif b == 0:
		return a
	if a > b:
		return gcd(a % b, b)
	else:
		return gcd(a, b % a)

def bfs(adj, v):
	visited = [False] * (v + 1)
	q = deque()
	while q:
		pass

def sieve():
	li = [True] * 1000001
	(li[0], li[1]) = (False, False)
	for i in range(2, len(li), 1):
		if li[i] == True:
			for j in range(i * i, len(li), i):
				li[j] = False
	prime = []
	for i in range(1000001):
		if li[i] == True:
			prime.append(i)
	return prime

def setBit(n):
	count = 0
	while n != 0:
		n = n & n - 1
		count += 1
	return count
mx = 10 ** 7
spf = [mx] * (mx + 1)

def SPF():
	spf[1] = 1
	for i in range(2, mx + 1):
		if spf[i] == mx:
			spf[i] = i
			for j in range(i * i, mx + 1, i):
				if i < spf[j]:
					spf[j] = i
	return

def readTree(v):
	adj = [set() for i in range(v + 1)]
	for i in range(v - 1):
		(u1, u2) = In()
		adj[u1].add(u2)
		adj[u2].add(u1)
	return adj

def solve():
	s = input()
	n = len(s)
	print(5)
	print('L', n - 1)
	n = n + (n - 2)
	print('L', n - 1)
	n = n + (n - 2)
	print('L', 2)
	n += 1
	print('R', 2)
	n = n + (n - 2)
	print('R', n - 1)
	return
t = 1
for i in range(t):
	solve()


import sys
input = sys.stdin.readline
S = list(input())[:-1]
N = len(S)
print(5)
print('R', 2)
N += N - 2
print('R', 2)
N += N - 2
print('L', 2)
N += 1
print('R', 2)
N += N - 2
print('R', N - 1)


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__
string = input()
print(3)
print('L {}'.format(len(string) - 1))
print('R {}'.format(len(string) - 1))
print('R {}'.format(2 * len(string) - 1))


st = input()
n = len(st)
print(4)
print('L', n - 1)
print('L', 2)
print('R', 2)
print('R', 4 * n - 5)


s = input()
l = len(s)
print(4)
print('R', l - 1)
print('L', 2)
print('L', l + 1)
print('L', 2)


s = input()
n = len(s)
s = s[1] + s
n += 1
r = []
r.append(('L', 2))
r.append(('R', 2))
n += n - 2
r.append(('R', n - 1))
print(len(r))
for i in r:
	print(*i)


import sys
import math
from collections import defaultdict, deque
input = sys.stdin.readline

def inar():
	return [int(el) for el in input().split()]

def main():
	s = input().strip()
	n = len(s)
	print(3)
	print('R', n - 1)
	print('L', n)
	print('L', 2)
main()


def ans(S):
	N = len(S)
	print(3)
	print('L', 2)
	S = S[1] + S
	N = len(S)
	print('R', 2)
	S = S + S[1:N - 1][::-1]
	N = len(S)
	print('R', N - 1)
	S = S + S[N - 2]
	assert S == S[::-1]
ans(input())


sl = input()
if sl == sl[::-1]:
	print(0)
else:
	n = len(sl)
	print(3)
	print('R ' + str(n - 1))
	print('L ' + str(n))
	print('L 2')


s = input()
n = len(s)
ans = [('L', 2), ('R', 2), ('R', 2 * n - 1)]
print(len(ans))
for item in ans:
	print(*item)


s = input()
n = len(s)
p = True
for i in range(n // 2):
	if s[i] != s[n - 1 - i]:
		p = False
		break
if p:
	print(0)
else:
	print(3)
	print('R ' + str(n - 1))
	print('L ' + str(n))
	print('L ' + str(2))


from sys import *
input = stdin.readline
s = input()
n = len(s) - 1
stdout.write('3\n')
stdout.write('L {}\n'.format(n - 1))
stdout.write('R {}\n'.format(n - 1))
stdout.write('R {}\n'.format(n + n - 1))


def main():
	word = input()
	n = len(word)
	print('3\nR', n - 1, '\nL', n, '\nL 2')
	return 0
main()


import os
import sys
from io import BytesIO, IOBase
import heapq as h
from bisect import bisect_left, bisect_right
from types import GeneratorType
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		import os
		self.os = os
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			self.os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
import time
start_time = time.time()
import collections as col
import math, string
from functools import reduce

def getInts():
	return [int(s) for s in input().split()]

def getInt():
	return int(input())

def getStrs():
	return [s for s in input().split()]

def getStr():
	return input()

def listStr():
	return list(input())
MOD = 10 ** 9 + 7

def solve():
	S = getStr()
	print(3)
	print('L', 2)
	print('R', 2)
	print('R', 2 * len(S) - 1)
	return
solve()


s = input()
n = len(s)
ans = []
if s[-3] != s[-1]:
	ans.append(['R', n - 1])
	n += 1
	s += s[-2]
ans.append(['L', n - 1])
ans.append(['L', 2])
print(len(ans))
for a in ans:
	print(*a)


import os
import sys
from io import BytesIO, IOBase
_str = str
BUFSIZE = 8192

def str(x=b''):
	return x if type(x) is bytes else _str(x).encode()

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def inp():
	return sys.stdin.readline().rstrip()

def mpint():
	return map(int, inp().split(' '))

def itg():
	return int(inp())

def to_list(binary_num, size=None):
	if size is None:
		size = binary_num.bit_length()
	result = [0] * size
	index = size - 1
	while binary_num:
		if binary_num & 1:
			result[index] = 1
		index -= 1
		binary_num >>= 1
	return result

def solve():
	s = inp()
	n = len(s)
	if n & 1:
		print(6)
		print('R', n - 1)
		n += 1
	else:
		print(5)
	print('R', n - 1)
	print('R', n - 1)
	print('L', 2)
	print('R', 2)
	print('R', (n + 2) * 2 + 2 - 1)

def main():
	solve()
DEBUG = 0
URL = ''
if DEBUG == 1:
	import requests
	from ACgenerator.Y_Test_Case_Runner import TestCaseRunner
	runner = TestCaseRunner(main, URL)
	inp = runner.input_stream
	print = runner.output_stream
	runner.checking()
elif DEBUG == 2:
	main()
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
	main()


from sys import stdin, stdout
string = stdin.readline()[:-1]
n = len(string)
print(str(3))
print('L 2')
print('R 2')
print('R ' + str(2 * n - 1))


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from heapq import *
from math import gcd, factorial, floor, ceil
from copy import deepcopy
from collections import deque
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
from types import GeneratorType

def iterative(f, stack=[]):

	def wrapped_func(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		to = f(*args, **kwargs)
		while True:
			if type(to) is GeneratorType:
				stack.append(to)
				to = next(to)
				continue
			stack.pop()
			if not stack:
				break
			to = stack[-1].send(to)
		return to
	return wrapped_func
mod = 10 ** 9 + 7

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for pp in range(t):
		solve(pp)

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def google(p):
	print('Case #' + str(p) + ': ', end='')

def lcm(a, b):
	return a * b // gcd(a, b)

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def solve(case):
	s = inp()
	n = len(s)
	print(3)
	print('L', 2)
	print('R', 2)
	print('R', 2 * n - 1)
testcase(1)


s = input()
a = len(s)
k = 0
for i in range(len(s) // 2):
	if s[i] != s[a - i - 1]:
		k = 1
		break
if k == 0:
	print(0)
else:
	print(4)
	print('R', 2)
	print('R', a * 2 - 3)
	print('L', a * 2 - 2)
	print('L', 2)


def solution():
	s = list(input())
	ans = 4
	l = []
	l.append(['R', str(2)])
	l.append(['L', str(2 * len(s) - 3)])
	x = 2 * (2 * len(s) - 2) - 2
	y = x + 2 * len(s) - 3
	l.append(['R', str(2 * len(s) - 3)])
	z = y - (2 * len(s) - 4)
	l.append(['R', str(z)])
	print(ans)
	for i in range(4):
		print(l[i][0], l[i][1])
t = 1
for _ in range(t):
	solution()


s = input()
l = []
n = len(s)
s = s[1:1] + s
l.append(['L', 2])
n = len(s)
s = s + s[1:n - 1]
n = len(s)
l.append(['R', 2])
s = s + s[n - 1:n]
n = len(s)
l.append(['R', n])
print(3)
for i in range(len(l)):
	print(l[i][0], l[i][1])


from collections import *
from itertools import *
from bisect import *

def inp():
	return int(input())

def arrinp():
	return [int(x) for x in input().split()]

def main():
	s = input()
	k = 0
	(i, j) = (0, len(s) - 1)
	flag = True
	while i < j:
		if s[i] != s[j]:
			flag = False
			break
		i += 1
		j -= 1
	if flag:
		print(0)
		return None
	n = len(s)
	k = 3
	print(k)
	print('L', n - 1)
	temp = 1 + n - 2
	print('R', temp)
	temp = n + n - 2 + 1
	print('R', temp)
main()


def solve():
	s = str(input())
	n = len(s)
	print(3)
	print('R', n - 1)
	print('L', n)
	print('L', 2)

def main():
	t = 1
	for _ in range(t):
		solve()
main()


from sys import stdin, stdout, setrecursionlimit
import heapq
from math import gcd, ceil, sqrt
from collections import Counter, deque
from bisect import bisect_left, bisect_right
from itertools import combinations, permutations
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
setrecursionlimit(100000)
mod = 1000000007
s = is1()
print(3)
print('R', len(s) - 1)
print('L', len(s))
print('L', 2)


s = input()
n = len(s)
print(5)
print('R', n - 1)
n += 1
print('R', n - 1)
n += 1
print('L', n - 1)
n += n - 2
print('R', 2)
n += n - 2
print('R', n - 1)


rn = lambda : int(input())
rl = lambda : list(map(int, input().split()))
rns = lambda : map(int, input().split())
rs = lambda : input()
yn = lambda x: print('Yes') if x else print('No')
YN = lambda x: print('YES') if x else print('NO')
s = rs()
n = len(s)
print(3)
print('R ' + str(n - 1))
print('L ' + str(n))
print('L 2')


x = input()
print(3)
print('L 2')
print('R 2')
print('R', 2 * len(x) - 1)


def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())
s = insr()
l = len(s)
print(4)
print('L 2')
print('L 2')
print('R 2')
print('R ' + str(2 * l + 1))


l = input()
n = len(l)
print(3)
print('L 2')
n += 1
print('R 2')
n += n - 1
print('R ' + str(n - 2))


import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys
from typing import List
s = input().strip()
n = len(s)
print(3)
print('R {}'.format(n - 1))
print('L {}'.format(n))
print('L {}'.format(2))


import bisect
import sys
from collections import defaultdict
S = list(input())
N = len(S)
print(3)
print('R', N - 1)
print('L', N)
print('L', 2)


def solv():
	x = len(input())
	print(3)
	print('R', x - 1)
	print('L', x)
	print('L', 2)
solv()


import sys, os, io

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math, datetime, functools, itertools, operator, bisect, fractions, statistics
from collections import deque, defaultdict, OrderedDict, Counter
from fractions import Fraction
from decimal import Decimal
from sys import stdout

def main():
	starttime = datetime.datetime.now()
	if os.path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	for _ in range(1):
		s = rs()
		n = len(s)
		print(3)
		print('R', 2)
		print('L', n)
		print('L', n - 1)
	endtime = datetime.datetime.now()
	time = (endtime - starttime).total_seconds() * 1000
	if os.path.exists('input.txt'):
		print('Time:', time, 'ms')

class FastReader(io.IOBase):
	newlines = 0

	def __init__(self, fd, chunk_size=1024 * 8):
		self._fd = fd
		self._chunk_size = chunk_size
		self.buffer = io.BytesIO()

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self, size=-1):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size if size == -1 else size))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

class FastWriter(io.IOBase):

	def __init__(self, fd):
		self._fd = fd
		self.buffer = io.BytesIO()
		self.write = self.buffer.write

	def flush(self):
		os.write(self._fd, self.buffer.getvalue())
		(self.buffer.truncate(0), self.buffer.seek(0))

class FastStdin(io.IOBase):

	def __init__(self, fd=0):
		self.buffer = FastReader(fd)
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

class FastStdout(io.IOBase):

	def __init__(self, fd=1):
		self.buffer = FastWriter(fd)
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.flush = self.buffer.flush
sys.stdin = FastStdin()
sys.stdout = FastStdout()
main()


def FunctionThatGetShitDone():
	s = input()
	print('3\nL 2\nR 2\nR {}'.format(len(s) + len(s) - 1))
FunctionThatGetShitDone()


import sys
import collections
input = sys.stdin.readline
s = input()
s = s[:len(s) - 1]
print(3)
print('R', len(s) - 1)
print('L', len(s))
print('L', 2)


import sys
input = sys.stdin.readline
s = input().strip()
n = len(s)
print(3)
print('R', n - 1)
print('L', n)
print('L', 2)


def main():
	S = input()
	N = len(S)
	print(6)
	print('L', 2)
	print('L', 2)
	print('L', 2)
	print('L', 2)
	print('R', 2)
	print('R', 2 * N + 5)
	return
main()


import sys
import os
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
mod = 10 ** 9 + 7

def lcm(x, y):
	return x * y / gcd(x, y)

def fact(x, mod=mod):
	ans = 1
	for i in range(1, x + 1):
		ans = ans * i % mod
	return ans

def arr2D(n, m, default=0):
	return [[default for j in range(m)] for i in range(n)]

def arr3D(n, m, r, default=0):
	return [[[default for k in range(r)] for j in range(m)] for i in range(n)]

def sortDictV(x):
	return {k: v for (k, v) in sorted(x.items(), key=lambda item: item[1])}

def solve(lst):
	n = len(lst)
	print(3)
	print('L', n - 1)
	print('R', n - 1)
	print('R', 2 * n - 1)
lst = input()
solve(lst)


something = input()
N = len(something)
print(3)
print('L', 2)
print('R', 2)
print('R', 2 * N - 1)


def testcase():
	s = input()
	n = len(s)
	if s == s[::-1]:
		print(0)
		return
	print(4)
	print('L', 2)
	print('L', 2)
	n += 2
	print('R', 2)
	n += n - 2
	print('R', n - 1)
	return
t = 1
for _ in range(t):
	testcase()


import sys
import bisect as bi
import math
from collections import defaultdict as dd
import heapq
import itertools
import io
import os
input = sys.stdin.readline
import random
mo = 10 ** 9 + 7

def cin():
	return map(int, sin().split())

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())
for _ in range(1):
	s = sin().strip()
	n = len(s)
	print(3)
	print('L', 2)
	print('R', 2)
	print('R', 2 * n - 1)


s = input()
t = len(s)
for i in range(t // 2 + 1):
	if s[i] != s[t - 1 - i]:
		t = 0
		break
if t:
	print(0)
else:
	print(3)
	print('L 2')
	print('R 2')
	print('R' + ' ' + str(2 * len(s) - 1))


import sys
input = sys.stdin.readline

def R(a):
	return 'R {}'.format(a)

def L(a):
	return 'L {}'.format(a)
s = input().strip('\n')
n = len(s)
cmd = []
cmd.append(R(2))
cmd.append(L(n))
cmd.append(L(n - 1))
print(3)
print('\n'.join(cmd))


import sys
sys.setrecursionlimit(10 ** 5)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep='\n')

def II():
	return int(sys.stdin.buffer.readline())

def MI():
	return map(int, sys.stdin.buffer.readline().split())

def LI():
	return list(map(int, sys.stdin.buffer.readline().split()))

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def BI():
	return sys.stdin.buffer.readline().rstrip()

def SI():
	return sys.stdin.buffer.readline().rstrip().decode()
s = SI()
n = len(s)
print(3)
print('L', 2)
print('R', 2)
print('R', 2 * n - 1)


t = input()
n = len(t)
l = n - 2
print(3)
print('L {}'.format(n - 1))
print('R {}'.format(l + 1))
print('R {}'.format(2 * l + 3))


import sys
import math
from collections import defaultdict, Counter
s = input()
s1 = len(s)
print(3)
print('R', s1 - 1)
print('L', s1)
print('L', 2)


s = input()
print(4)
curr = len(s)
print('L', curr - 1)
curr = (curr - 2) * 2 + 2
print('R', curr - 1)
curr += 1
print('L', curr - 1)
print('L', 2)


def find_polindormize_actions(s):
	n = len(s)
	print('3')
	print('L 2')
	print('R 2')
	print('R {}'.format(2 * n - 1))
s = input()
find_polindormize_actions(s)


from sys import stdin, stdout
n = stdin.readline()[:-1]
if n == n[::-1]:
	print(0)
else:
	print(3)
	print('L {}'.format(len(n) - 1))
	print('R {}'.format(len(n) - 1))
	print('R {}'.format(2 * len(n) - 1))


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush, nsmallest
from math import ceil, floor, gcd, fabs, factorial, fmod, sqrt, inf
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
from decimal import Decimal
mod = pow(10, 9) + 7

def data():
	return sys.stdin.readline().strip()

def out(var):
	sys.stdout.write(str(var) + '\n')

def outa(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def l():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
s = list(input())
n = len(s)
print(4)
print('R', n - 1)
print('L', 2)
n += 2
print('R', 2)
n += n - 2
print('R', n - 1)


def main():
	for i in range(1):
		solve()

def pc(s):
	for i in range(len(s) // 2):
		if s[i] != s[len(s) - 1 - i]:
			return False
	return True

def solve():
	s = input()
	if pc(s):
		print(0)
		return
	print(3)
	print('R', len(s) - 1)
	print('L', len(s))
	print('L', 2)
import itertools
import bisect, math
import copy
import fractions

def s(e):
	return sum(e)

def l(e):
	return len(e)

def num():
	return int(input())

def array():
	return list(map(int, input().split()))

def pair():
	return map(int, input().split())

def p(x='', end='\n'):
	return print(x, end=end)

def sort(a):
	return sorted(a)

def fpair(x):
	return str(fractions.Fraction(x)).split('/')

def parray(a):
	for i in a:
		p(i, end=' ')
	p()
main()


from collections import Counter, defaultdict, deque
from math import inf

def f(s):
	return 'L {}'.format(len(s))
t = 1
result = []
for i in range(t):
	s = input()
	print(3)
	print('R {}'.format(len(s) - 1))
	print('L {}'.format(len(s)))
	print('L 2')


def palindrome(a):
	print('3')
	print('L', 2)
	print('R', 2)
	print('R', 2 * len(a) - 1)
	return ''
print(palindrome(input()))


import sys
input = sys.stdin.readline

def main():
	S = input().strip()
	N = len(S)
	if S == S[::-1]:
		print(0)
		return
	print(4)
	print('L 2')
	print('L 2')
	print('R 2')
	print('R ' + str(N + N + 1))
main()


import sys, math, itertools
from collections import Counter, deque, defaultdict
from bisect import bisect_left, bisect_right
mod = 10 ** 9 + 7
INF = float('inf')

def inp():
	return int(sys.stdin.readline())

def inpl():
	return list(map(int, sys.stdin.readline().split()))
s = list(sys.stdin.readline())
s = s[:len(s) - 1]
n = len(s)
res = []
if n == 3:
	res.append(('L', 2))
	n += 1
res.append(('L', 2))
res.append(('R', 4))
res.append(('R', 2))
res.append(('R', 4 * n - 7))
print(len(res))
for (a, b) in res:
	print(a, b)


def main():
	S = input()
	print(3)
	print('L', len(S) - 1)
	print('R', len(S) - 1)
	print('R', 2 * len(S) - 1)
main()


import sys, math, cmath, time
start_time = time.time()

def solve():
	s = insr()
	print('3', 'L 2', 'R 2', 'R ' + str(len(s) * 2 - 1), sep='\n')

def main():
	global tt
	if not ONLINE_JUDGE:
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	t = 1
	for tt in range(1, t + 1):
		solve()
	if not ONLINE_JUDGE:
		print('Time Elapsed :', time.time() - start_time, 'seconds')
		sys.stdout.close()

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	return input().strip()

def invr():
	return map(int, input().split())

def counter(a):
	q = [0] * max(a)
	for i in range(len(a)):
		q[a[i] - 1] = q[a[i] - 1] + 1
	return q

def counter_elements(a):
	q = dict()
	for i in range(len(a)):
		if a[i] not in q:
			q[a[i]] = 0
		q[a[i]] = q[a[i]] + 1
	return q

def string_counter(a):
	q = [0] * 26
	for i in range(len(a)):
		q[ord(a[i]) - 97] = q[ord(a[i]) - 97] + 1
	return q

def factorial(n, m=1000000007):
	q = 1
	for i in range(n):
		q = q * (i + 1) % m
	return q

def factors(n):
	q = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			q.append(i)
			q.append(n // i)
	return list(sorted(list(set(q))))

def prime_factors(n):
	q = []
	while n % 2 == 0:
		q.append(2)
		n = n // 2
	for i in range(3, int(n ** 0.5) + 1, 2):
		while n % i == 0:
			q.append(i)
			n = n // i
	if n > 2:
		q.append(n)
	return list(sorted(q))

def transpose(a):
	(n, m) = (len(a), len(a[0]))
	b = [[0] * n for i in range(m)]
	for i in range(m):
		for j in range(n):
			b[i][j] = a[j][i]
	return b

def power_two(x):
	return x and (not x & x - 1)

def ceil(a, b):
	return -(-a // b)

def seive(n):
	a = [1]
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p ** 2, n + 1, p):
				prime[i] = False
		p = p + 1
	for p in range(2, n + 1):
		if prime[p]:
			a.append(p)
	return a
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
	input = sys.stdin.readline
main()


import sys
import os
from math import sqrt, log, log2, log10, gcd, floor, pow, sin, cos, tan, pi, inf, factorial
from copy import copy, deepcopy
from sys import exit, stdin, stdout
from collections import Counter, defaultdict, deque
from itertools import permutations
import heapq
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
mod = 1000000007
iinp = lambda : int(sys.stdin.readline())
inp = lambda : sys.stdin.readline().strip()
strl = lambda : list(inp().strip().split(' '))
intl = lambda : list(map(int, inp().split(' ')))
mint = lambda : map(int, inp().split())
flol = lambda : list(map(float, inp().split(' ')))
flush = lambda : stdout.flush()

def permute(nums):

	def fun(arr, nums, cur, v):
		if len(cur) == len(nums):
			arr.append(cur.copy())
		i = 0
		while i < len(nums):
			if v[i]:
				i += 1
				continue
			else:
				cur.append(nums[i])
				v[i] = 1
				fun(arr, nums, cur, v)
				cur.pop()
				v[i] = 0
				i += 1
		return arr
	res = []
	nums.sort()
	v = [0] * len(nums)
	return fun(res, nums, [], v)

def subsets(res, index, arr, cur):
	res.append(cur.copy())
	for i in range(index, len(arr)):
		cur.append(arr[i])
		subsets(res, i + 1, arr, cur)
		cur.pop()
	return res

def sieve(N):
	root = int(sqrt(N))
	primes = [1] * (N + 1)
	(primes[0], primes[1]) = (0, 0)
	for i in range(2, root + 1):
		if primes[i]:
			for j in range(i * i, N + 1, i):
				primes[j] = 0
	return primes

def bs(arr, l, r, x):
	if x < arr[0] or x > arr[len(arr) - 1]:
		return -1
	while l <= r:
		mid = l + (r - l) // 2
		if arr[mid] == x:
			return mid
		elif arr[mid] < x:
			l = mid + 1
		else:
			r = mid - 1
	return -1

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	p = int(sqrt(n))
	for i in range(5, p + 1, 6):
		if n % i == 0 or n % (i + 2) == 0:
			return False
	return True

def solve():
	s = inp()
	n = len(s)
	print(3)
	print('L', 2)
	s = s[1] + s
	n = len(s)
	print('R', 2)
	s += s[1:n - 1][::-1]
	n = len(s)
	print('R', n - 1)
	s += s[n - 2]
solve()


from bisect import *
from collections import *
from math import *
from heapq import *
from typing import List
from itertools import *
from operator import *
from functools import *
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def RL():
	return map(int, sys.stdin.readline().rstrip().split())

def RLL():
	return list(map(int, sys.stdin.readline().rstrip().split()))

def N():
	return int(input())

@lru_cache(None)
def fact(x):
	if x < 2:
		return 1
	return fact(x - 1) * x

@lru_cache(None)
def per(i, j):
	return fact(i) // fact(i - j)

@lru_cache(None)
def com(i, j):
	return per(i, j) // fact(j)

def linc(f, t, l, r):
	while l < r:
		mid = (l + r) // 2
		if t > f(mid):
			l = mid + 1
		else:
			r = mid
	return l

def rinc(f, t, l, r):
	while l < r:
		mid = (l + r + 1) // 2
		if t < f(mid):
			r = mid - 1
		else:
			l = mid
	return l

def ldec(f, t, l, r):
	while l < r:
		mid = (l + r) // 2
		if t < f(mid):
			l = mid + 1
		else:
			r = mid
	return l

def rdec(f, t, l, r):
	while l < r:
		mid = (l + r + 1) // 2
		if t > f(mid):
			r = mid - 1
		else:
			l = mid
	return l

def isprime(n):
	for i in range(2, int(n ** 0.5) + 1):
		if n % i == 0:
			return False
	return True

def binfun(x):
	c = 0
	for w in arr:
		c += ceil(w / x)
	return c

def lowbit(n):
	return n & -n

class BIT:

	def __init__(self, arr):
		self.arr = arr
		self.n = len(arr) - 1

	def update(self, x, v):
		while x <= self.n:
			self.arr[x] += v
			x += x & -x

	def query(self, x):
		ans = 0
		while x:
			ans += self.arr[x]
			x &= x - 1
		return ans

class smt:

	def __init__(self, l, r, arr):
		self.l = l
		self.r = r
		self.value = (1 << 31) - 1 if l < r else arr[l]
		mid = (l + r) // 2
		if l < r:
			self.left = smt(l, mid, arr)
			self.right = smt(mid + 1, r, arr)
			self.value &= self.left.value & self.right.value

	def setvalue(self, x, val):
		if self.l == self.r:
			self.value = val
			return
		mid = (self.l + self.r) // 2
		if x <= mid:
			self.left.setvalue(x, val)
		else:
			self.right.setvalue(x, val)
		self.value = self.left.value & self.right.value

	def ask(self, l, r):
		if l <= self.l and r >= self.r:
			return self.value
		val = (1 << 31) - 1
		mid = (self.l + self.r) // 2
		if l <= mid:
			val &= self.left.ask(l, r)
		if r > mid:
			val &= self.right.ask(l, r)
		return val

class UFS:

	def __init__(self, n):
		self.parent = [i for i in range(n)]
		self.ranks = [0] * n

	def find(self, x):
		if x != self.parent[x]:
			self.parent[x] = self.find(self.parent[x])
		return self.parent[x]

	def union(self, u, v):
		(pu, pv) = (self.find(u), self.find(v))
		if pu == pv:
			return False
		if self.ranks[pu] >= self.ranks[pv]:
			self.parent[pv] = pu
			if self.ranks[pv] == self.ranks[pu]:
				self.ranks[pu] += 1
		else:
			self.parent[pu] = pv

def Prime(n):
	c = 0
	prime = []
	flag = [0] * (n + 1)
	for i in range(2, n + 1):
		if not flag[i]:
			prime.append(i)
			c += 1
		for j in range(c):
			if i * prime[j] > n:
				break
			flag[i * prime[j]] = prime[j]
			if i % prime[j] == 0:
				break
	return prime

def dij(s, graph):
	d = {}
	d[s] = 0
	heap = [(0, s)]
	seen = set()
	while heap:
		(dis, u) = heappop(heap)
		if u in seen:
			continue
		for v in graph[u]:
			if v not in d or d[v] > d[u] + graph[u][v]:
				d[v] = d[u] + graph[u][v]
				heappush(heap, (d[v], v))
	return d
s = input()
n = len(s)
ans = []
if s[-3] != s[-1]:
	ans.append(['R', n - 1])
	n += 1
	s += s[-2]
ans.append(['L', n - 1])
ans.append(['L', 2])
print(len(ans))
for a in ans:
	print(*a)


s = input()
ls = len(s)
print(4)
print('L', ls - 1)
ls += ls - 2
print('L', ls - 1)
p = ls - 1
ls += ls - 2
print('R', p)
print('R', ls + 1)


s = input().strip()
n = len(s)
print('3\nL 2\nR 2\nR %s' % (2 * n - 1))


from collections import Counter
from collections import OrderedDict
from collections import defaultdict

def freq_count(mylist):
	return Counter(mylist)
st = list(input())
cp = st.copy()
cp.reverse()
if st == cp:
	print(0)
else:
	print(3)
	print('R', len(st) - 1)
	print('L', len(st))
	print('L', 2)


def isPalin(s):
	n = len(s)
	for i in range(n >> 1):
		if s[i] != s[n - i - 1]:
			return False
	return True
s = input()
n = len(s)
if isPalin(s):
	print(0)
else:
	print(3)
	print('L', 2)
	print('R', 2)
	print('R', n + 1 + (n - 1) - 1)


from sys import stdin, stdout
from math import gcd, sqrt, factorial, pi, inf
from collections import deque, defaultdict
input = stdin.readline
R = lambda : map(int, input().split())
I = lambda : int(input())
S = lambda : input().rstrip('\n')
L = lambda : list(R())
P = lambda x: stdout.write(str(x) + '\n')
lcm = lambda x, y: x * y // gcd(x, y)
hg = lambda x, y: (y + x - 1) // x * x
pw = lambda x: 1 if x == 1 else 1 + pw(x // 2)
chk = lambda x: chk(x // 2) if not x % 2 else True if x == 1 else False
sm = lambda x: (x ** 2 + x) // 2
N = 10 ** 6 + 6
n = len(S())
print(3)
print(f'R {n - 1}')
print(f'L {n}')
print(f'L 2')


s = input()

def L(x, i):
	if i < 2 or i >= len(x):
		raise ValueError()
	return ''.join(reversed(x[1:i])) + x

def R(x, i):
	if i < 2 or i >= len(x):
		raise ValueError()
	return x + ''.join(reversed(x[i - 1:len(x) - 1]))
s = L(s, 2)
s = R(s, 2)
print(3)
print('L {:d}'.format(2))
print('R {:d}'.format(2))
print('R {:d}'.format(len(s) - 1))


inp = lambda : int(input())
strl = lambda : list(input().strip())
seq = lambda : list(map(int, input().strip().split()))

def main():
	a = input()
	n = len(a)
	b = n
	print(3)
	print(f'L {2}')
	print(f'R {2}')
	print(f'R {2 * n - 1}')
main()


string = str(input())
print(3)
print('R ' + str(len(string) - 1))
print('L ' + str(len(string)))
print('L ' + str(2))


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from math import gcd, ceil

def prod(a, mod=10 ** 9 + 7):
	ans = 1
	for each in a:
		ans = ans * each % mod
	return ans

def lcm(a, b):
	return a * b // gcd(a, b)

def binary(x, length=16):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y
for _ in range(int(input()) if not True else 1):
	s = input()
	n = len(s)
	print(3)
	print('L 2')
	print('R 2')
	print('R %d' % (2 * n - 1))


s = input().strip()
if s == s[::-1]:
	print(0)
else:
	print(3)
	print(f'R {len(s) - 1}')
	print(f'L {len(s)}')
	print('L 2')


import sys, io, os, time
from collections import defaultdict
from collections import Counter
from collections import deque
from itertools import combinations
from itertools import permutations
import bisect, math, heapq
alphabet = 'abcdefghijklmnopqrstuvwxyz'
s = input()
print(3)
n = len(s)
print('L', n - 1)
print('R', n - 1)
print('R', 2 * n - 1)


import sys
import math
from collections import Counter, defaultdict
LI = lambda : list(map(int, input().split()))
MAP = lambda : map(int, input().split())
IN = lambda : int(input())
S = lambda : input()

def case():
	s = S()
	n = len(s)
	print(3)
	n += 1
	print('L', 2)
	n += n - 2
	print('R', 2)
	print('R', n - 1)
for _ in range(1):
	case()


def solve(s, n):
	print(3)
	print('L 2')
	n += 1
	print('R 2')
	n += n - 3
	print(f'R {n}')
s = input()
n = len(s)
valid = True
for i in range(n // 2):
	if s[i] != s[n - i - 1]:
		valid = False
		break
if valid:
	print(0)
else:
	solve(s, n)


import sys
input = sys.stdin.readline
(inp, ip) = (lambda : int(input()), lambda : [int(w) for w in input().split()])
s = input().strip()
n = len(s)
print(3)
print('L 2')
print('R 2')
print('R ' + str(2 * n - 1))


def main():
	s = input()
	print(4)
	print('R', len(s) - 1)
	print('L', 2)
	print('L', len(s) + 1)
	print('L', 2)
t = 1
for i in range(t):
	main()


X = input()
print(3)
print('L 2')
print('R 2')
print('R', 2 * len(X) - 1)


my_input = input()
new_string = my_input[1] + my_input
new_string = new_string + new_string[-2]
new_string = new_string[-2:0:-1] + new_string
new_string = new_string[1] + new_string
print('4')
print('L', '2')
print('R', len(my_input))
print('L', len(my_input) + 1)
print('L', '2')


str = input()
count = 0
for i in str:
	count += 1
print(3)
print('R', count - 1)
print('L', count)
print('L', 2)


t = 1
for _ in range(t):
	s = input()
	n = len(s)
	print(4)
	print('L', n - 1)
	n += n - 2
	print('R', n - 1)
	n += 1
	print('L', n - 1)
	n += n - 2
	print('L', 2)


from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush, heappop
import math
from collections import *
from functools import reduce, cmp_to_key
import sys
input = sys.stdin.readline
M = mod = 998244353

def factors(n):
	return sorted(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def inv_mod(n):
	return pow(n, mod - 2, mod)

def li():
	return [int(i) for i in input().rstrip('\n').split()]

def st():
	return input().rstrip('\n')

def val():
	return int(input().rstrip('\n'))

def li2():
	return [i for i in input().rstrip('\n')]

def li3():
	return [int(i) for i in input().rstrip('\n')]
s = st()
n = len(s)
print(3)
print('L', 2)
n += 1
print('R', 2)
n += n - 2
print('R', n - 1)


import itertools
import math
import sys
from collections import defaultdict

def is_debug():
	return '--debug' in sys.argv

def stdin_wrapper():
	data = 'hannah\n\n\n'
	for line in data.split('\n'):
		yield line
if not is_debug():

	def stdin_wrapper():
		while True:
			yield sys.stdin.readline()
inputs = stdin_wrapper()

def input_wrapper():
	return next(inputs)

def get_str():
	if is_debug():
		return input_wrapper()
	return input()

def get(_type):
	if _type == str:
		return get_str()
	return _type(input_wrapper())

def get_arr(_type):
	return [_type(x) for x in input_wrapper().split()]

def tuplerize(method):

	def wrap(*args, **kwargs):
		res = method(*args, **kwargs)
		if not isinstance(res, (tuple, list)):
			res = (res,)
		return res
	return wrap

@tuplerize
def solve(s):

	def is_palindrome(x):
		for i in range(len(x) // 2):
			if x[i] != x[-1 - i]:
				return False
		return True

	def execute(d, cmds):
		for cmd in cmds:
			(_dir, l) = cmd.split(' ')
			l = int(l)
			if _dir == 'R':
				d = d + ''.join([x for x in reversed(d[l - 1:-1])])
			else:
				d = ''.join([x for x in reversed(d[1:l])]) + d
		return d
	if is_palindrome(s):
		return 0
	res = ['R {}'.format(len(s) - 1), 'L {}'.format(len(s)), 'L 2']
	if is_debug():
		p = execute(s, res)
		print('Verify', p, is_palindrome(p))
	return '{}\n{}'.format(len(res), '\n'.join(res))
print(*solve(get_str()))


w = input()
print(3)
print('L 2')
print('R 2')
print('R %d' % (len(w) * 2 - 1))


str_test = input()
if str_test == str_test[::-1]:
	print(0)
else:
	print(3)
	print('R', len(str_test) - 1)
	print('L', len(str_test))
	print('L', 2)


def isPalindrome(s):
	return s == s[::-1]
s = str(input())
ans = isPalindrome(s)
if ans:
	print(0)
	exit(0)
n = len(s)
(x, y, z) = (2, 2, n + 1 + n - 2)
print(3)
print(str('L ' + str(x) + '\nR ' + str(y) + '\nR ' + str(z)))


s = input()
L = []
R = []
n = len(s)
print(4)
s1 = s[:]
s = s[1:n - 1][::-1] + s
print('L', n - 1)
s = s + s[n - 1:-1][::-1]
print('R', n)
s = s + s[n - 2:-1][::-1]
print('R', n - 1)
s = s + s[-(n - 1):-1][::-1]
print('R', 4 * n - 5)


s = input()
n = len(s)
print(3)
pre = n - 2
print('L', n - 1)
print('R', n - 2 + 1)
total = n + n - 1 + n - 2 + 1
print('R', total - pre - 1)


def isPalin(st):
	(i, j) = (0, len(st) - 1)
	while i <= j:
		if st[i] == st[j]:
			i += 1
			j -= 1
		else:
			return False
	return True

def proC(st):
	if isPalin(st):
		print(0)
		return
	print(3)
	print('R', len(st) - 1)
	print('L', len(st))
	print('L', 2)
n = input()
proC(n)