The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.

The slogan of the company consists of n characters, so the decorators hung a large banner, n meters wide and 1 meter high, divided into n equal squares. The first character of the slogan must be in the first square (the leftmost) of the poster, the second character must be in the second square, and so on.

Of course, the R1 programmers want to write the slogan on the poster themselves. To do this, they have a large (and a very heavy) ladder which was put exactly opposite the k-th square of the poster. To draw the i-th character of the slogan on the poster, you need to climb the ladder, standing in front of the i-th square of the poster. This action (along with climbing up and down the ladder) takes one hour for a painter. The painter is not allowed to draw characters in the adjacent squares when the ladder is in front of the i-th square because the uncomfortable position of the ladder may make the characters untidy. Besides, the programmers can move the ladder. In one hour, they can move the ladder either a meter to the right or a meter to the left.

Drawing characters and moving the ladder is very tiring, so the programmers want to finish the job in as little time as possible. Develop for them an optimal poster painting plan!


-----Input-----

The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of the characters: '.', '!', ',', '?'.


-----Output-----

In t lines, print the actions the programmers need to make. In the i-th line print:  "LEFT" (without the quotes), if the i-th action was "move the ladder to the left";  "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right";  "PRINT x" (without the quotes), if the i-th action was to "go up the ladder, paint character x, go down the ladder". 

The painting time (variable t) must be minimum possible. If there are multiple optimal painting plans, you can print any of them.


-----Examples-----
Input
2 2
R1

Output
PRINT 1
LEFT
PRINT R

Input
2 1
R1

Output
PRINT R
RIGHT
PRINT 1

Input
6 4
GO?GO!

Output
RIGHT
RIGHT
PRINT !
LEFT
PRINT O
LEFT
PRINT G
LEFT
PRINT ?
LEFT
PRINT O
LEFT
PRINT G



-----Note-----

Note that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.

Source: codeforces | Difficulty: EASY
Tags: Implementation

Greedy algorithms


Solutions:
(a, b) = map(int, input().split())
slogan = list(input())
if b - 1 <= a - b:
	print('LEFT\n' * (b - 1), end='')
	for i in range(a - 1):
		print(f'PRINT {slogan[i]}\nRIGHT')
	print(f'PRINT {slogan[-1]}')
else:
	print('RIGHT\n' * (a - b), end='')
	for i in range(a - 1):
		print(f'PRINT {slogan[-(i + 1)]}\nLEFT')
	print(f'PRINT {slogan[0]}')


def print_to_right(n, characters):
	for i in range(n):
		print(f'PRINT {characters[i]}')
		if i != n - 1:
			print('RIGHT')

def print_to_left(n, characters):
	for i in range(n - 1, -1, -1):
		print(f'PRINT {characters[i]}')
		if i != 0:
			print('LEFT')
(n, k) = map(int, input().split())
characters = input()
if k == 1:
	print_to_right(n, characters)
elif k == n:
	print_to_left(n, characters)
elif k > n // 2:
	for i in range(n - k):
		print('RIGHT')
	print_to_left(n, characters)
else:
	for i in range(k - 1):
		print('LEFT')
	print_to_right(n, characters)


(n, m) = map(int, input().split())
t = list(input())
g = t[::-1]
if m == 1:
	for j in range(n):
		if 0 <= j < n - 1:
			print('PRINT ', t[j])
			print('RIGHT')
		else:
			print('PRINT ', t[j])
elif m == n:
	for k in range(n):
		if 0 <= k < n - 1:
			print('PRINT ', g[k])
			print('LEFT')
		else:
			print('PRINT ', g[k])
elif m - 1 < n - m:
	for x in range(m - 1):
		print('LEFT')
	for j in range(n):
		if 0 <= j < n - 1:
			print('PRINT ', t[j])
			print('RIGHT')
		else:
			print('PRINT ', t[j])
else:
	for aw in range(n - m):
		print('RIGHT')
	for k in range(n):
		if 0 <= k < n - 1:
			print('PRINT ', g[k])
			print('LEFT')
		else:
			print('PRINT ', g[k])


def ladder(n, k, a):
	a = list(a)
	if k == 0:
		print('PRINT', a[0])
		for x in range(1, len(a)):
			print('RIGHT')
			print('PRINT', a[x])
	elif k == n:
		print('PRINT', a[-1])
		for x in range(len(a) - 2, -1, -1):
			print('LEFT')
			print('PRINT', a[x])
	elif k > n // 2:
		for y in range(n - k):
			print('RIGHT')
		print('PRINT', a[-1])
		for x in range(len(a) - 2, -1, -1):
			print('LEFT')
			print('PRINT', a[x])
	else:
		for y in range(k - 1):
			print('LEFT')
		print('PRINT', a[0])
		for x in range(1, len(a)):
			print('RIGHT')
			print('PRINT', a[x])
(n, k) = list(map(int, input().split()))
a = input()
ladder(n, k, a)


[n, k] = [int(i) for i in input().split()]
s = input()
if n - k > k - 1:
	i = 0
	d = 1
	for j in range(k - 1):
		print('LEFT')
else:
	i = n - 1
	d = -1
	for j in range(n - k):
		print('RIGHT')
for j in range(n - 1):
	print('PRINT', s[i])
	print('LEFT' if d < 0 else 'RIGHT')
	i += d
print('PRINT', s[i])


l1 = [int(x) for x in input().split()]
(n, k) = (l1[0], l1[1])
l2 = list(input())
if k > (n + 1) / 2:
	i = k - 1
	while i < n - 1:
		print('RIGHT')
		i += 1
	l2.reverse()
	i = 0
	while i < n:
		print('PRINT', l2[i])
		if i != n - 1:
			print('LEFT')
		i += 1
else:
	i = k - 1
	while i > 0:
		print('LEFT')
		i -= 1
	i = 0
	while i < n:
		print('PRINT', l2[i])
		if i != n - 1:
			print('RIGHT')
		i += 1


(n, k) = map(int, input().split())
s = input()
if 2 * k <= n:
	for i in range(k - 1):
		print('LEFT')
	way = 'RIGHT'
	print('PRINT', s[0])
	for i in range(1, len(s)):
		print(way)
		print('PRINT', s[i])
else:
	for i in range(n - k):
		print('RIGHT')
	way = 'LEFT'
	s = s[::-1]
	print('PRINT', s[0])
	for i in range(1, len(s)):
		print(way)
		print('PRINT', s[i])


def main():
	(n, k) = map(int, input().split())
	s = input()
	if k - 1 <= n - k:
		for i in range(k - 1):
			print('LEFT')
		for i in range(n - 1):
			print('PRINT', s[i])
			print('RIGHT')
		print('PRINT', s[n - 1])
	else:
		for i in range(n - k):
			print('RIGHT')
		for i in range(n - 1, 0, -1):
			print('PRINT', s[i])
			print('LEFT')
		print('PRINT', s[0])
main()


import sys
import math
import itertools
import collections

def divs(n, start=1):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def cdiv(n, k):
	return n // k + (n % k != 0)

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

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

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

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

def wr(arr):
	return ''.join(map(str, arr))

def revn(n):
	return int(str(n)[::-1])

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base=3):
	newnumber = ''
	while number > 0:
		newnumber = str(number % base) + newnumber
		number //= base
	return newnumber

def write(arrs, nap):
	for item in range(len(arrs) - 1):
		print('PRINT', arrs[item])
		print(nap)
	print('PRINT', arrs[-1])
	return
(n, k) = mi()
s = list(input())
if n - k >= n // 2:
	for i in range(k - 1):
		print('LEFT')
	write(s, 'RIGHT')
else:
	for i in range(n - k):
		print('RIGHT')
	s.reverse()
	write(s, 'LEFT')


(n, k) = list(map(int, input().split()))
s = input()
left = k - 1
right = n - k
if left > right:
	for i in range(n - k):
		print('RIGHT')
	for j in range(n - 1, 0, -1):
		print('PRINT ' + s[j])
		print('LEFT')
	print('PRINT ' + s[0])
else:
	for i in range(k - 1):
		print('LEFT')
	for j in range(n - 1):
		print('PRINT ' + s[j])
		print('RIGHT')
	print('PRINT ' + s[n - 1])


a = list(map(int, input().split()))
b = input()
if a[1] - 1 < a[0] - a[1]:
	for x in range(0, a[1] - 1):
		print('LEFT')
	for x in range(0, a[0]):
		print('PRINT ' + b[x])
		if x != a[0] - 1:
			print('RIGHT')
else:
	for x in range(0, a[0] - a[1]):
		print('RIGHT')
	for x in range(1, a[0] + 1):
		print('PRINT ' + b[-x])
		if x != a[0]:
			print('LEFT')


(n, k) = list(map(int, input().split()))
line = input()
if k <= n // 2:
	for i in range(k - 1):
		print('LEFT')
	print('PRINT', line[0])
	for i in range(n - 1):
		print('RIGHT')
		print('PRINT', line[i + 1])
else:
	for i in range(n - k):
		print('RIGHT')
	print('PRINT', line[-1])
	for i in range(n - 1):
		print('LEFT')
		print('PRINT', line[n - i - 2])


def ans1(n, k, s):
	ans = []
	for i in range(k - 1, n - 1):
		ans.append('PRINT ' + s[i])
		ans.append('RIGHT')
	ans.append('PRINT ' + s[n - 1])
	for i in range(k, n + 1):
		ans.append('LEFT')
	for i in range(k - 2, 0, -1):
		ans.append('PRINT ' + s[i])
		ans.append('LEFT')
	ans.append('PRINT ' + s[0])
	return ans

def ans2(n, k, s):
	ans = []
	for i in range(k - 1, 0, -1):
		ans.append('PRINT ' + s[i])
		ans.append('LEFT')
	ans.append('PRINT ' + s[0])
	for i in range(k):
		ans.append('RIGHT')
	for i in range(k, n - 1):
		ans.append('PRINT ' + s[i])
		ans.append('RIGHT')
	ans.append('PRINT ' + s[n - 1])
	return ans

def main():
	(n, k) = map(int, input().split())
	s = input()
	if n == k:
		for i in range(n - 1, 0, -1):
			print('PRINT', s[i])
			print('LEFT')
		print('PRINT', s[0])
	elif k == 1:
		for i in range(n - 1):
			print('PRINT', s[i])
			print('RIGHT')
		print('PRINT', s[n - 1])
	else:
		a1 = ans1(n, k, s)
		a2 = ans2(n, k, s)
		if len(a1) < len(a2):
			for line in a1:
				print(line)
		else:
			for line in a2:
				print(line)
main()


(n, m) = map(int, input().split())
s = input()
if n - m < m:
	for i in range(n - m):
		print('RIGHT')
	s = s[::-1]
	for i in range(n):
		if i:
			print('LEFT')
		print('PRINT', s[i])
else:
	for i in range(1, m):
		print('LEFT')
	for i in range(n):
		if i:
			print('RIGHT')
		print('PRINT', s[i])


(n, k) = [int(x) for x in input().split()]
s = input()
if k >= len(s) // 2 + 1:
	for x in range(k, len(s)):
		print('RIGHT')
	for x in range(len(s), 0, -1):
		print('PRINT', s[x - 1])
		if x - 1 != 0:
			print('LEFT')
else:
	for x in range(k, 1, -1):
		print('LEFT')
	for x in range(len(s)):
		print('PRINT', s[x])
		if x + 1 != len(s):
			print('RIGHT')


def printfromLeft(string):
	for i in range(len(string)):
		print('PRINT {}'.format(string[i]))
		if i < len(string) - 1:
			print('RIGHT')

def printfromRight(string):
	for i in range(len(string) - 1, -1, -1):
		print('PRINT {}'.format(string[i]))
		if i > 0:
			print('LEFT')
(n, k) = map(int, input().split())
logo = input()
if k == 1:
	printfromLeft(logo)
elif k == len(logo):
	printfromRight(logo)
else:
	mid = len(logo) // 2
	if k > mid:
		for i in range(k, len(logo)):
			print('RIGHT')
		printfromRight(logo)
	else:
		for i in range(0, k - 1):
			print('LEFT')
		printfromLeft(logo)


def main():
	(n, k) = [int(c) for c in input().split()]
	slogan = input()
	if k > n // 2:
		for i in range(k - 1, n):
			print('PRINT {}'.format(slogan[i]))
			if i != n - 1:
				print('RIGHT')
		for i in range(k - 1, n - 1):
			print('LEFT')
		for i in range(k - 2, -1, -1):
			print('LEFT')
			print('PRINT {}'.format(slogan[i]))
	else:
		for i in range(k - 1, -1, -1):
			print('PRINT {}'.format(slogan[i]))
			if i != 0:
				print('LEFT')
		for i in range(k - 1, 0, -1):
			print('RIGHT')
		for i in range(k, n):
			print('RIGHT')
			print('PRINT {}'.format(slogan[i]))
main()


import sys
(n, k) = map(int, input().split())
s = input()
k -= 1
Ans = ''
if k + 1 > n // 2:
	for j in range(k, n - 1):
		Ans += 'PRINT ' + s[j] + '\n'
		Ans += 'RIGHT\n'
	Ans += 'PRINT ' + s[n - 1] + '\n'
	ind = n - 1
	if k > 0:
		while ind >= k:
			Ans += 'LEFT\n'
			ind -= 1
		for i in range(ind, 0, -1):
			Ans += 'PRINT ' + s[i] + '\n'
			Ans += 'LEFT\n'
		Ans += 'PRINT ' + s[0] + '\n'
else:
	for j in range(k, 0, -1):
		Ans += 'PRINT ' + s[j] + '\n'
		Ans += 'LEFT\n'
	Ans += 'PRINT ' + s[0] + '\n'
	ind = 0
	if k < n - 1:
		while ind <= k:
			Ans += 'RIGHT\n'
			ind += 1
		for i in range(ind, n - 1):
			Ans += 'PRINT ' + s[i] + '\n'
			Ans += 'RIGHT\n'
		Ans += 'PRINT ' + s[n - 1] + '\n'
sys.stdout.write(Ans)


(n, k) = [int(x) for x in input().split()]
x = input()
if k > n // 2:
	for i in range(n - k):
		print('RIGHT')
	x = x[::-1]
	for i in range(n - 1):
		print('PRINT {}'.format(x[i]))
		print('LEFT')
	print('PRINT {}'.format(x[n - 1]))
else:
	for i in range(k - 1):
		print('LEFT')
	for i in range(n - 1):
		print('PRINT {}'.format(x[i]))
		print('RIGHT')
	print('PRINT {}'.format(x[n - 1]))


def solve(n, k, s):
	if k > n // 2 and n != k:
		for i in range(k, n):
			print('RIGHT')
		k = n
	elif k <= n // 2 and k != 1:
		for j in range(1, k):
			print('LEFT')
		k = 1
	if k == n:
		for l in range(n - 1, -1, -1):
			print('PRINT', s[l])
			if l != 0:
				print('LEFT')
	else:
		for l in range(0, n):
			print('PRINT', s[l])
			if l != n - 1:
				print('RIGHT')
(n, k) = map(int, input().split())
s = input()
solve(n, k, s)


(n, k) = map(int, input().split())
(a, b, c, t) = ('LEFT\n', 'RIGHT\n', 'PRINT ', input())
if 2 * k > n:
	(k, a, b, t) = (n - k + 1, b, a, t[::-1])
print(a * (k - 1) + c + ('\n' + b + c).join(t))


(n, k) = [int(x) for x in input().split()]
slogan = input()
if k <= n / 2:
	if k != 1:
		for x in range(k - 1):
			print('LEFT')
		for x in range(n):
			print('PRINT ' + slogan[x])
			if x != n - 1:
				print('RIGHT')
	else:
		for x in range(n):
			print('PRINT ' + slogan[x])
			if x != n - 1:
				print('RIGHT')
elif k != n:
	for x in range(n - k):
		print('RIGHT')
	for x in reversed(range(n)):
		print('PRINT ' + slogan[x])
		if x != 0:
			print('LEFT')
else:
	for x in reversed(range(n)):
		print('PRINT ' + slogan[x])
		if x != 0:
			print('LEFT')


(n, k) = map(int, input().split())
line = input()
j = k - 1
if n - k > k - 1:
	for i in range(k - 1):
		print('LEFT')
		j -= 1
	add = 'RIGHT'
else:
	for i in range(n - k):
		print('RIGHT')
		j += 1
	add = 'LEFT'
if j == 0:
	for i in range(n - 1):
		print('PRINT', line[i])
		print(add)
	print('PRINT', line[-1])
else:
	for i in range(j, 0, -1):
		print('PRINT', line[i])
		print(add)
	print('PRINT', line[0])


(n, k) = map(int, input().split())
l = list(input())
j = n - 1
x = 0
if k == n:
	for i in range(n - 1, -1, -1):
		print('PRINT', l[i])
		if i > 0:
			print('LEFT\n', end='')
elif k == 1:
	for i in range(n):
		print('PRINT', l[i])
		if i < n - 1:
			print('RIGHT\n', end=' ')
elif k <= n - k:
	print('LEFT\n' * (k - 1), end=' ')
	while x <= n - 1:
		print('PRINT', l[x])
		if x != n - 1:
			print('RIGHT')
		x += 1
elif k > n - k:
	print('RIGHT\n' * (n - k), end='')
	while j >= 0:
		print('PRINT', l[j])
		if j != 0:
			print('LEFT')
		j -= 1


import re
import inspect
from sys import argv, exit

def rstr():
	return input()

def rstrs(splitchar=' '):
	return [i for i in input().split(splitchar)]

def rint():
	return int(input())

def rints(splitchar=' '):
	return [int(i) for i in rstrs(splitchar)]

def varnames(obj, namespace=globals()):
	return [name for name in namespace if namespace[name] is obj]

def pvar(var, override=False):
	prnt(varnames(var), var)

def prnt(*args, override=False):
	if '-v' in argv or override:
		print(*args)
(n, k) = rints()
slogan = rstr()
k = k - 1
start = k
moves = 1
if k >= n / 2:
	while k < len(slogan) - 1:
		print('RIGHT')
		k += 1
	i = 0
	for c in reversed(slogan):
		print('PRINT {}'.format(c))
		i += 1
		if i != len(slogan):
			print('LEFT')
else:
	while k > 0:
		print('LEFT')
		k -= 1
	i = 0
	for c in slogan:
		print('PRINT {}'.format(c))
		i += 1
		if i != len(slogan):
			print('RIGHT')


(n, k) = map(int, input().split())
s = list(input())
if k > n // 2:
	y = n - k
	for i in range(y):
		print('RIGHT')
	for i in range(len(s) - 1, -1, -1):
		if i == 0:
			print('PRINT {}'.format(s[i]))
		else:
			print('PRINT {}'.format(s[i]))
			print('LEFT')
else:
	y = k - 1
	for i in range(y):
		print('LEFT')
	for i in range(len(s)):
		if i == n - 1:
			print('PRINT {}'.format(s[i]))
		else:
			print('PRINT {}'.format(s[i]))
			print('RIGHT')


a = input().split()
lozung = input()
n = int(a[0])
k = int(a[1])
tol = k - 1
tor = n - k
if tol > tor:
	for i in range(tor):
		print('RIGHT')
	for i in range(1, n):
		print('PRINT ' + lozung[n - i])
		print('LEFT')
	print('PRINT ' + lozung[0])
else:
	for i in range(tol):
		print('LEFT')
	for i in range(n - 1):
		print('PRINT ' + lozung[i])
		print('RIGHT')
	print('PRINT ' + lozung[n - 1])


(n, x) = list(map(int, input().split()))
s = input()
if x <= n // 2:
	while x > 1:
		print('LEFT')
		x -= 1
	while x <= n:
		print('PRINT', s[x - 1])
		if x == n:
			exit()
		print('RIGHT')
		x += 1
else:
	while x < n:
		print('RIGHT')
		x += 1
	while x >= 1:
		print('PRINT', s[x - 1])
		if x == 1:
			exit()
		print('LEFT')
		x -= 1


(n, k) = list(map(int, input('').split()))
lozung = list(input())
if n - k < k:
	for i in range(k, n):
		print('RIGHT')
	for i in reversed(list(range(0, n))):
		print('PRINT ', lozung[i])
		if i != 0:
			print('LEFT')
else:
	for i in reversed(list(range(0, k - 1))):
		print('LEFT')
	for i in range(n):
		print('PRINT ', lozung[i])
		if i != n - 1:
			print('RIGHT')


(n, i) = list(map(int, input().split()))
lozung = input()
if i > n // 2:
	while i < n:
		print('RIGHT')
		i += 1
	while i > 0:
		print('PRINT', lozung[i - 1])
		i -= 1
		if i != 0:
			print('LEFT')
else:
	while i > 1:
		print('LEFT')
		i -= 1
	while i <= n:
		print('PRINT', lozung[i - 1])
		i += 1
		if i != n + 1:
			print('RIGHT')


(a, b) = map(int, input().split())
c = input()
d = len(c)
if d - b >= b:
	for i in range(b - 1):
		print('LEFT')
	for i in range(d - 1):
		print('PRINT', c[i])
		print('RIGHT')
	print('PRINT', c[a - 1])
else:
	for i in range(d - b):
		print('RIGHT')
	for i in range(d - 1):
		print('PRINT', c[a - 1 - i])
		print('LEFT')
	print('PRINT', c[0])


(n, k) = map(int, input().split())
a = input()
li = []
if n == k or k > n // 2:
	for i in range(n - k):
		li.append('RIGHT')
	a = list(a)
	a.reverse()
	for i in range(n):
		if i != 0:
			li.append('LEFT')
		li.append('PRINT' + ' ' + a[i])
else:
	for i in range(k - 1):
		li.append('LEFT')
	a = list(a)
	for i in range(n):
		if i != 0:
			li.append('RIGHT')
		li.append('PRINT' + ' ' + a[i])
print(*li, sep='\n')


(l, k) = list(map(int, input().split()))
phrase = input()

def print_sw(word: str) -> str:
	arr = ['PRINT ' + i for i in word]
	return '\nRIGHT\n'.join(arr)

def print_bw(word: str) -> str:
	arr = ['PRINT ' + i for i in word[::-1]]
	return '\nLEFT\n'.join(arr)
if k > l / 2:
	while k != l:
		print('RIGHT')
		k += 1
	print(print_bw(phrase))
else:
	while k != 1:
		print('LEFT')
		k -= 1
	print(print_sw(phrase))


nk = input().split()
n = int(nk[0])
k = int(nk[1])
s = input()
if k <= (n + 1) // 2:
	for i in range(k - 1):
		print('LEFT')
	for i in range(n):
		print('PRINT', s[i])
		if i != n - 1:
			print('RIGHT')
else:
	for i in range(n - k):
		print('RIGHT')
	for i in range(n):
		print('PRINT', s[n - 1 - i])
		if i != n - 1:
			print('LEFT')


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

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 solve():
	(n, k) = invr()
	s = insr()
	a = list(s)
	if k > len(a) - k + 1:
		q = 'LEFT'
		w = ['RIGHT'] * (n - k)
		a.reverse()
	else:
		q = 'RIGHT'
		w = ['LEFT'] * (k - 1)
	for i in range(len(a)):
		w.append('PRINT ' + a[i])
		w.append(q)
	w.pop()
	for i in range(len(w)):
		print(w[i])

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

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 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
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
	input = sys.stdin.readline
main()


(n, k) = map(int, input().split())
s = input()
if n > 2:
	if k > n / 2:
		while k < n:
			k += 1
			print('RIGHT')
	else:
		while k > 1:
			k += -1
			print('LEFT')
	if k == n:
		for i in range(n - 1, -1, -1):
			print('PRINT ' + s[i])
			if i != 0:
				print('LEFT')
	else:
		for i in range(n):
			print('PRINT ' + s[i])
			if i != n - 1:
				print('RIGHT')
elif n == 2:
	print('PRINT ' + s[k - 1])
	if k == 1:
		print('RIGHT')
		k += 1
	else:
		print('LEFT')
		k += -1
	print('PRINT ' + s[k - 1])
else:
	print('PRINT ' + s[k - 1])


(n, k) = list(map(int, input().split()))
s = input()
dist = min(k - 1, n - k - 1)
temp = []
if dist == n - k - 1 and k != 1 and (2 * k != n):
	for _ in range(dist + 1):
		print('RIGHT')
	for j in range(len(s) - 1, -1, -1):
		print(f'PRINT {s[j]}')
		temp.append(s[j])
		if j != 0:
			print('LEFT')
else:
	for _ in range(dist):
		print('LEFT')
	for j in range(len(s)):
		print(f'PRINT {s[j]}')
		if j != len(s) - 1:
			print('RIGHT')


a = lambda : list(map(int, input().strip().split()))
(n, k) = a()
s = input()
n2 = n // 2
if k <= n2:
	while k > 1:
		print('LEFT')
		k -= 1
	for i in s[:-1]:
		print('PRINT ' + i)
		print('RIGHT')
	print('PRINT ' + s[-1])
else:
	if k != n:
		while k < n:
			print('RIGHT')
			k += 1
	for i in reversed(s[1:]):
		print('PRINT ' + i)
		print('LEFT')
	print('PRINT ' + s[0])


(n, k) = list(map(int, input().split()))
logo = input()
if k == 1:
	for i in range(n):
		if i == n - 1:
			print('PRINT', logo[i])
		else:
			print('PRINT', logo[i])
			print('RIGHT')
elif k == n:
	for i in range(n - 1, -1, -1):
		if i == 0:
			print('PRINT', logo[i])
		else:
			print('PRINT', logo[i])
			print('LEFT')
elif abs(k) > abs(k - n):
	while k < n:
		print('RIGHT')
		k = k + 1
	for i in range(n - 1, -1, -1):
		if i == 0:
			print('PRINT', logo[i])
		else:
			print('PRINT', logo[i])
			print('LEFT')
elif abs(k) <= abs(k - n):
	while k > 1:
		print('LEFT')
		k = k - 1
	for i in range(n):
		if i == n - 1:
			print('PRINT', logo[i])
		else:
			print('PRINT', logo[i])
			print('RIGHT')


(n, k) = map(int, input().split())
l = list(input())
x = n // 2
if k > x:
	a = n - k
	for i in range(a):
		print('RIGHT')
	for i in range(n):
		print('PRINT', end=' ')
		print(l[n - 1 - i])
		if i != n - 1:
			print('LEFT')
else:
	a = k
	for i in range(1, k):
		print('LEFT')
	for i in range(n):
		print('PRINT', end=' ')
		print(l[i])
		if i != n - 1:
			print('RIGHT')


inp = input().split(' ')
(chars, pos) = (int(inp[0]), int(inp[1]) - 1)
s = input()
if pos != 0 or pos != chars - 1:
	if pos <= chars - 1 - pos:
		for _ in range(pos):
			print('LEFT')
		pos = 0
	else:
		for _ in range(chars - 1 - pos):
			print('RIGHT')
		pos = chars - 1
if pos == 0:
	while pos != chars:
		print('PRINT ' + s[pos])
		if pos != chars - 1:
			print('RIGHT')
		pos += 1
elif pos == chars - 1:
	while pos != -1:
		print('PRINT ' + s[pos])
		if pos != 0:
			print('LEFT')
		pos -= 1


import math
(n, k) = map(int, input().split())
s = input()
c = 0
p = n - k
q = k - 1
if p <= q:
	for i in range(p + 1):
		c += 1
		print('PRINT', s[k + i - 1])
		if c != n:
			if k + i != n:
				print('RIGHT')
			else:
				print('LEFT')
	for i in range(p):
		print('LEFT')
	for i in range(q, 0, -1):
		c += 1
		print('PRINT', s[i - 1])
		if c != n:
			if i != 1:
				print('LEFT')
else:
	for i in range(q + 1, 0, -1):
		print('PRINT', s[i - 1])
		if i != 1:
			print('LEFT')
		else:
			print('RIGHT')
	for i in range(q):
		print('RIGHT')
	for i in range(p):
		print('PRINT', s[k + i])
		if k + i + 1 != n:
			print('RIGHT')


from sys import stdin
input = stdin.readline
(n, k) = (int(x) for x in input().split())
s = input()[:-1]
if k - 1 <= n - k:
	print('LEFT\n' * (k - 1), end='')
	print('PRINT', s[0])
	for c in s[1:]:
		print('RIGHT')
		print('PRINT', c)
else:
	print('RIGHT\n' * (n - k), end='')
	print('PRINT', s[-1])
	for c in s[-2::-1]:
		print('LEFT')
		print('PRINT', c)


e = input()
L = e.split()
n = int(L[0])
x = int(L[1])
s = input()
z = len(s) - 1
Flag = False
if x - 1 <= n - x:
	for i in range(x - 1):
		print('LEFT')
	Flag = True
else:
	for i in range(n - x):
		print('RIGHT')
if Flag == True:
	for i in range(len(s)):
		print('PRINT ' + s[i])
		if i != len(s) - 1:
			print('RIGHT')
else:
	while z >= 0:
		print('PRINT ' + s[z])
		if z != 0:
			print('LEFT')
		z -= 1


(n, k) = list(map(int, input().split()))
st = input()
if 2 * k <= n:
	for i in range(k - 1):
		print('LEFT')
	naprav = 'RIGHT'
else:
	for i in range(n - k):
		print('RIGHT')
	naprav = 'LEFT'
	st = st[::-1]
print('PRINT', st[0])
for i in range(1, len(st)):
	print(naprav)
	print('PRINT', st[i])


first_input = input()
slogan_str = input()
first_input_as_list = first_input.split(' ')
nber_signs = int(first_input_as_list[0])
initial_pos = int(first_input_as_list[1])
slogan = []
for i in range(len(slogan_str)):
	slogan.append(slogan_str[i])
if nber_signs == 1:
	print('PRINT {}'.format(slogan[0]))
elif initial_pos <= nber_signs / 2:
	pos = initial_pos
	while pos > 1:
		print('LEFT')
		pos -= 1
	while pos < nber_signs:
		print('PRINT {}'.format(slogan[pos - 1]))
		print('RIGHT')
		pos += 1
	print('PRINT {}'.format(slogan[-1]))
else:
	pos = initial_pos
	while pos < nber_signs:
		print('RIGHT')
		pos += 1
	while pos > 1:
		print('PRINT {}'.format(slogan[pos - 1]))
		print('LEFT')
		pos -= 1
	print('PRINT {}'.format(slogan[-0]))


(n, k) = list(map(int, input().split()))
s = input()
d = 0
if n == 1:
	print(f'PRINT {s}')
	exit()
if k > n // 2:
	d = 1
else:
	d = -1
k -= 1
ac = ['PRINT', 'RIGHT', 'LEFT']
e = [0, n - 1]
t = 0
while k not in e:
	print(ac[d])
	k += d
	t += 1
d *= -1
while True:
	print(ac[0] + ' ' + s[k])
	k += d
	print(ac[d])
	t += 2
	if k in e:
		break
if k <= n - 1:
	print(ac[0] + ' ' + s[k])


(n, k) = map(int, input().split())
s = input().strip()
if n - k < k - 1:
	for i in range(n - k):
		print('RIGHT')
	for i in reversed(range(1, n)):
		print('PRINT', s[i])
		print('LEFT')
	print('PRINT', s[0])
else:
	for i in range(k - 1):
		print('LEFT')
	for i in range(n - 1):
		print('PRINT', s[i])
		print('RIGHT')
	print('PRINT', s[n - 1])


t = input()
t = t.split(' ')
inpList = []
for i in range(len(t)):
	inpList.insert(i, int(t[i]))
s = input()
if inpList[1] <= int(inpList[0] / 2):
	while inpList[1] != 1:
		print('LEFT')
		inpList[1] += -1
	for i in range(len(s)):
		print('PRINT {}'.format(s[i]))
		if i != len(s) - 1:
			print('RIGHT')
else:
	while inpList[1] != inpList[0]:
		print('RIGHT')
		inpList[1] += 1
	i = len(s) - 1
	while i > -1:
		print('PRINT {}'.format(s[i]))
		if i != 0:
			print('LEFT')
		i += -1


(n, k) = map(int, input().split())
s = list(input())
k -= 1

def goright():
	for i in range(n):
		print('PRINT ' + s[i])
		if i < n - 1:
			print('RIGHT')

def goleft():
	for i in range(n):
		print('PRINT ' + s[n - i - 1])
		if i < n - 1:
			print('LEFT')
if k == 0:
	goright()
elif k == n - 1:
	goleft()
elif n - k > n / 2:
	for i in range(k):
		print('LEFT')
	goright()
else:
	for i in range(n - k - 1):
		print('RIGHT')
	goleft()


(n, k) = [int(i) for i in input().split()]
k -= 1
s = input()
if k >= len(s) - 1 - k:
	while k < len(s) - 1:
		print('RIGHT')
		k += 1
	while k >= 0:
		print('PRINT ' + s[k])
		if k == 0:
			break
		print('LEFT')
		k -= 1
else:
	while k > 0:
		print('LEFT')
		k -= 1
	while k < len(s):
		print('PRINT ' + s[k])
		if k == len(s) - 1:
			break
		print('RIGHT')
		k += 1


(n, k) = map(int, input().split())
s = input()
from math import ceil
if k > ceil(n / 2):
	for i in range(n - k):
		print('RIGHT')
		k += 1
	for i in reversed(range(n)):
		print('PRINT', s[i])
		if i != 0:
			print('LEFT')
else:
	for i in range(k - 1):
		print('LEFT')
		k -= 1
	for i in range(n):
		print('PRINT', s[i])
		if i != n - 1:
			print('RIGHT')


X = list(map(int, input().split()))
(Sentence, Status) = (input(), False)
(Status, X[1]) = (True if abs(X[1] - X[0]) < X[1] - 1 else False, X[1] - 1)
(Top, Bottom, Stop, Msg1, Msg2, it) = (X[0] - 1, -1, 0, 'RIGHT', 'LEFT', -1)
if not Status:
	(Top, Bottom, Stop, Msg1, Msg2, it) = (0, X[0], X[0] - 1, 'LEFT', 'RIGHT', 1)
while X[1] != Top:
	print(Msg1)
	X[1] += -1 * it
while X[1] != Bottom:
	print('PRINT ' + Sentence[X[1]])
	if X[1] != Stop:
		print(Msg2)
	X[1] += it


(n, k) = map(int, input().split())
string = list(input())
if n // 2 >= k:
	if k == 1 or k == n:
		for i in range(0, n - 1):
			print('PRINT', string[i])
			print('RIGHT')
		print('PRINT', string[n - 1])
	else:
		for k in range(abs(1 - k)):
			print('LEFT')
		for i in range(0, n - 1):
			print('PRINT', string[i])
			print('RIGHT')
		print('PRINT', string[n - 1])
elif k == 1 or k == n:
	i = n - 1
	while i >= 1:
		print('PRINT', string[i])
		print('LEFT')
		i -= 1
	print('PRINT', string[0])
else:
	for k in range(abs(n - k)):
		print('RIGHT')
	i = n - 1
	while i >= 1:
		print('PRINT', string[i])
		print('LEFT')
		i -= 1
	print('PRINT', string[0])


(n, k) = list(map(int, input().split()))
x = input()
t = min(n - k, k - 1)
ans = ''
if n == 1:
	ans = 'PRINT ' + x
elif t == n - k:
	if t == 0:
		j = n - 1
		while j > 0:
			ans += 'PRINT ' + x[j] + '\n' + 'LEFT\n'
			j -= 1
		ans += 'PRINT ' + x[0] + '\n'
	else:
		ans = t * 'RIGHT\n'
		j = n - 1
		while j > 0:
			ans += 'PRINT ' + x[j] + '\n' + 'LEFT\n'
			j -= 1
		ans += 'PRINT ' + x[0] + '\n'
elif t == 0:
	j = 0
	while j < n - 1:
		ans += 'PRINT ' + x[j] + '\n' + 'RIGHT\n'
		j += 1
	ans += 'PRINT ' + x[n - 1] + '\n'
else:
	ans = t * 'LEFT\n'
	j = 0
	while j < n - 1:
		ans += 'PRINT ' + x[j] + '\n' + 'RIGHT\n'
		j += 1
	ans += 'PRINT ' + x[n - 1] + '\n'
print(ans)


def dir_print(word, dir):
	for i in range(len(word)):
		print('PRINT', word[i])
		if i < len(word) - 1 and dir != '':
			print(dir)
(n, k) = map(int, input().split())
word = input().strip()
if n == 1:
	dir_print(word, '')
elif k == n:
	dir_print(word[::-1], 'LEFT')
elif k == 1:
	dir_print(word, 'RIGHT')
else:
	r = n - k
	l = k - 1
	if l < r:
		for i in range(l):
			print('LEFT')
		dir_print(word, 'RIGHT')
	else:
		for i in range(r):
			print('RIGHT')
		dir_print(word[::-1], 'LEFT')


line = input()
(char_length, init_pos) = line.split()
(char_length, init_pos) = (int(char_length), int(init_pos))
line = input()
if init_pos > char_length / 2:
	for i in range(init_pos, char_length):
		print('RIGHT')
	for (index, i) in enumerate(reversed(line)):
		if index != 0:
			print('LEFT')
		print('PRINT', i)
else:
	for i in range(1, init_pos):
		print('LEFT')
	for (index, i) in enumerate(line):
		if index != 0:
			print('RIGHT')
		print('PRINT', i)


(n, k) = map(int, input().split())
a = list(input())
(n, k) = (n - 1, k - 1)
if k == n:
	a = a[::-1]
	for i in range(len(a) - 1):
		print('PRINT', a[i])
		print('LEFT')
	print('PRINT', a[-1])
elif k == 0:
	for i in range(len(a) - 1):
		print('PRINT', a[i])
		print('RIGHT')
	print('PRINT', a[-1])
elif k < n / 2:
	for i in range(k):
		print('LEFT')
	for i in range(len(a) - 1):
		print('PRINT', a[i])
		print('RIGHT')
	print('PRINT', a[-1])
else:
	for i in range(n - k):
		print('RIGHT')
	a = a[::-1]
	for i in range(len(a) - 1):
		print('PRINT', a[i])
		print('LEFT')
	print('PRINT', a[-1])


import math
(n, k) = map(int, input().split())
p = input()
x = math.ceil(n / 2)
if k <= x:
	for _ in range(k - 1):
		print('LEFT')
	for i in range(len(p)):
		print('PRINT ' + p[i])
		if i != len(p) - 1:
			print('RIGHT')
else:
	for _ in range(n - k):
		print('RIGHT')
	p = p[::-1]
	for i in range(len(p)):
		print('PRINT ' + p[i])
		if i != len(p) - 1:
			print('LEFT')


p = input().rstrip().split(' ')
s = input().rstrip()
x = list(s)
A = int(p[1]) - 0
B = int(p[0]) - int(p[1])
T = min(A, B)
if T == A:
	for i in range(0, A - 1):
		print('LEFT')
	for i in range(0, len(x)):
		print('PRINT', x[i])
		if i != len(x) - 1:
			print('RIGHT')
else:
	for i in range(0, B):
		print('RIGHT')
	for i in range(len(x) - 1, -1, -1):
		print('PRINT', x[i])
		if i != 0:
			print('LEFT')


(a, b) = map(int, input().split())
s = input()
x = 0
a -= 1
b -= 1
if b < a - b:
	for i in range(b):
		print('LEFT')
	x = 1
else:
	for i in range(a - b):
		print('RIGHT')
	x = -1
	s = s[::-1]
for i in s[:-1]:
	print(f'PRINT {i}')
	if x == -1:
		print('LEFT')
	else:
		print('RIGHT')
print(f'PRINT {s[-1]}')


(N, K) = map(int, input().split())
S = list(input())
if N - K < K:
	m = 1
else:
	m = -1
K -= 1
n = 0
while 0 <= K and K < N:
	if S[K] != '':
		print('PRINT ' + S[K])
		S[K] = ''
		n += 1
	if K > 0 and K < N - 1:
		if m == 1:
			print('RIGHT')
		else:
			print('LEFT')
		K += m
	else:
		m = 0 - m
		break
if n < N:
	if m == 1:
		print('RIGHT')
		K += 1
	else:
		print('LEFT')
		K -= 1
	while 0 <= K and K < N:
		if S[K] != '':
			print('PRINT ' + S[K])
			S[K] = ''
		if K > 0 and K < N - 1:
			if m == 1:
				print('RIGHT')
			else:
				print('LEFT')
			K += m
		else:
			break


import fileinput

def test():
	pass
num_args = 2
for arg in range(num_args):
	if arg == 0:
		(n, k) = map(int, input().split())
	else:
		slogan = input()
if k != 1 and k != n:
	dist = min(abs(k - n), abs(k))
	if dist == k:
		while k != 1:
			k -= 1
			print('LEFT')
		for i in range(1, n + 1):
			print('PRINT', slogan[i - 1])
			if i < n:
				print('RIGHT')
	else:
		while k != n:
			k += 1
			print('RIGHT')
		for i in range(n, 0, -1):
			print('PRINT', slogan[i - 1])
			if i > 1:
				print('LEFT')
elif k == 1:
	for i in range(1, n + 1):
		print('PRINT', slogan[i - 1])
		if i < n:
			print('RIGHT')
else:
	for i in range(n, 0, -1):
		print('PRINT', slogan[i - 1])
		if i > 1:
			print('LEFT')


(n, k) = map(int, input().split())
s = input()
l = k - 1
r = n - k
if l > r:
	print('RIGHT\n' * r, end='')
	cnt = 0
	for i in s[::-1]:
		print('PRINT', i)
		if cnt == n - 1:
			break
		print('LEFT')
		cnt += 1
else:
	print('LEFT\n' * l, end='')
	cnt = 0
	for i in s:
		print('PRINT', i)
		if cnt == n - 1:
			break
		print('RIGHT')
		cnt += 1


(n, k) = list(map(int, input().split()))
s = input()
if k > n // 2:
	shift = 'RIGHT'
	oshift = 'LEFT'
	dist = n - k
	s = s[::-1]
else:
	shift = 'LEFT'
	oshift = 'RIGHT'
	dist = k - 1
for _ in range(dist):
	print(shift)
for (i, l) in enumerate(s):
	print('PRINT', l)
	if i != n - 1:
		print(oshift)


(a, b) = map(int, input().split())
i = input()
if b <= a // 2:
	for x in range(b - 1):
		print('LEFT')
	for y in range(a):
		print('PRINT ' + i[y])
		if y < a - 1:
			print('RIGHT')
else:
	for x in range(a - b):
		print('RIGHT')
	for y in range(1, a + 1):
		print('PRINT ' + i[-y])
		if y < a:
			print('LEFT')


(n, k) = map(int, input().split())
s = input()
i = k - 1
if k > n / 2:
	while i < n:
		print('PRINT', s[i])
		i += 1
		if i < n:
			print('RIGHT')
	i = n - 1
	while i > max(k - 2, 0):
		print('LEFT')
		i -= 1
	i = k - 2
	while i >= 0:
		print('PRINT', s[i])
		i -= 1
		if i >= 0:
			print('LEFT')
else:
	while i >= 0:
		print('PRINT', s[i])
		i -= 1
		if i >= 0:
			print('LEFT')
	i = 0
	while i < k:
		print('RIGHT')
		i += 1
	i = k
	while i < n:
		print('PRINT', s[i])
		i += 1
		if i < n:
			print('RIGHT')


(N, K) = map(int, input().split())
S = input()
a = K - 1
b = N - K
if a == 0:
	a = 1000
if b == 0:
	b = 1000
pos = K - 1
printed = 1
print('PRINT ' + str(S[pos]))
if a <= b:
	while pos != 0:
		print('LEFT')
		pos -= 1
		print('PRINT ' + str(S[pos]))
		printed += 1
	if printed != N:
		while pos != K - 1:
			print('RIGHT')
			pos += 1
		while pos != N - 1:
			print('RIGHT')
			pos += 1
			print('PRINT ' + str(S[pos]))
			printed += 1
elif a > b:
	while pos != N - 1:
		print('RIGHT')
		pos += 1
		print('PRINT ' + str(S[pos]))
		printed += 1
	if printed != N:
		while pos != K - 1:
			print('LEFT')
			pos -= 1
		while pos != 0:
			print('LEFT')
			pos -= 1
			print('PRINT ' + str(S[pos]))
			printed += 1


(n, k) = map(int, input().split())
s = str(input())
ans = []
r = 1
if k != len(s) and k != 1:
	if k == n / 2:
		r = 0
	start = min(len(s) - k, k)
	if start == len(s) - k and r == 1:
		ans = ['RIGHT'] * start
	else:
		ans = ['LEFT'] * (start - 1)
if len(s) == 1:
	t = 'PRINT ' + str(s)
	print(t)
elif 'RIGHT' in ans or k == len(s):
	s = s[::-1]
	for i in s:
		x = 'PRINT ' + str(i)
		ans.append(x)
		ans.append('LEFT')
	ans.pop()
	print(*ans, sep='\n')
else:
	for i in s:
		x = 'PRINT ' + str(i)
		ans.append(x)
		ans.append('RIGHT')
	ans.pop()
	print(*ans, sep='\n')


from collections import deque
from collections import OrderedDict
import math
import sys
import os
from io import BytesIO
import threading
import bisect
import heapq
input = lambda : sys.stdin.readline().rstrip('\r\n')

def printRun(s, e, st, w, shif):
	for i in range(s, e, st):
		print('PRINT', w[i])
		if i != e - st:
			print(shif)
answer = 0
(n, k) = map(int, input().split())
slog = '0' + input()
if n - k < k:
	for i in range(n - k):
		print('RIGHT')
	printRun(n, 0, -1, slog, 'LEFT')
else:
	for i in range(1, k):
		print('LEFT')
	printRun(1, n + 1, 1, slog, 'RIGHT')


(n, k) = map(int, input().split())
s = input()
if k == 1:
	for i in range(n):
		print('PRINT', s[i])
		if i != n - 1:
			print('RIGHT')
	exit()
if k == n:
	for i in range(-1, -n - 1, -1):
		print('PRINT', s[i])
		if i != -n:
			print('LEFT')
	exit()
if n - k < k:
	for j in range(n - k):
		print('RIGHT')
	for i in range(-1, -n - 1, -1):
		print('PRINT', s[i])
		if i != -n:
			print('LEFT')
else:
	for j in range(k - 1):
		print('LEFT')
	for i in range(n):
		print('PRINT', s[i])
		if i != n - 1:
			print('RIGHT')


(n, k) = map(int, input().split())
s = input()
if k * 2 <= n:
	shift = k - 1
	while shift:
		print('LEFT')
		shift -= 1
	for (i, char) in enumerate(s):
		print('PRINT', char)
		if i < n - 1:
			print('RIGHT')
else:
	shift = n - k
	while shift:
		print('RIGHT')
		shift -= 1
	for (i, char) in enumerate(s[::-1]):
		print('PRINT', char)
		if i < n - 1:
			print('LEFT')


from sys import stdin
max_val = int(10000000000000.0)
min_val = int(-10000000000000.0)

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

def read_ints():
	return [int(x) for x in stdin.readline().split()]

def read_str():
	return input()

def read_strs():
	return [x for x in stdin.readline().split()]
from sys import stdin
input = stdin.readline
(n, k) = (int(x) for x in input().split())
s = input()[:-1]
if k - 1 <= n - k:
	print('LEFT\n' * (k - 1), end='')
	print('PRINT', s[0])
	for c in s[1:]:
		print('RIGHT')
		print('PRINT', c)
else:
	print('RIGHT\n' * (n - k), end='')
	print('PRINT', s[-1])
	for c in s[-2::-1]:
		print('LEFT')
		print('PRINT', c)


import sys
import math
(n, k) = [int(x) for x in sys.stdin.readline().split()]
st = sys.stdin.readline()
v = 0
res = []
if k > int(n / 2):
	res.extend(['RIGHT'] * (n - k))
	res.append('PRINT ' + str(st[n - 1]))
	for i in range(n - 2, -1, -1):
		res.append('LEFT')
		res.append('PRINT ' + str(st[i]))
else:
	res.extend(['LEFT'] * (k - 1))
	res.append('PRINT ' + str(st[0]))
	for i in range(1, n):
		res.append('RIGHT')
		res.append('PRINT ' + str(st[i]))
for i in res:
	print(i)


(n, k) = map(int, input().split())
los = input()
if n == 1:
	print('PRINT', los, sep=' ')
else:
	if k > n / 2 and k != n and (k != 1):
		for i in range(n - k):
			print('RIGHT')
		for i in range(n):
			print('PRINT', los[n - i - 1], sep=' ')
			if i != n - 1:
				print('LEFT')
	if k <= n / 2 and k != n and (k != 1):
		for i in range(k - 1):
			print('LEFT')
		for i in range(n):
			print('PRINT', los[i], sep=' ')
			if i != n - 1:
				print('RIGHT')
	if k == 1:
		for i in range(n):
			print('PRINT', los[i], sep=' ')
			if i != n - 1:
				print('RIGHT')
	if k == n:
		for i in range(n):
			print('PRINT', los[n - i - 1], sep=' ')
			if i != n - 1:
				print('LEFT')


(n, k) = map(int, input().split())
J = list(input().strip())
r = 'RIGHT'
l = 'LEFT'
p = 'PRINT'
s = -1
f = 0
while n // k != 1 and k != 1:
	print(l)
	k -= 1
while n // k == 1 and k != n:
	print(r)
	k += 1
if k == 1:
	m = r
	s = 1
else:
	m = l
k = k - 1
print(p, J[k])
while f < n - 1:
	print(m)
	k = k + s
	print(p, J[k])
	f += 1


(n, k) = [int(r) for r in input().split()]
s = input()
if k <= n // 2:
	while k > 1:
		print('LEFT')
		k -= 1
	print('\nRIGHT\n'.join(('PRINT ' + c for c in s)))
else:
	while k < n:
		print('RIGHT')
		k += 1
	print('\nLEFT\n'.join(('PRINT ' + c for c in reversed(s))))


(n, k) = map(int, input().split())
l = list(input())
k = k - 1
d1 = n - 1 - k
d2 = k
if d1 < d2:
	k += 1
	for i in range(n - k):
		print('RIGHT')
	for i in range(len(l) - 1, -1, -1):
		if i == 0:
			print('PRINT ' + str(l[i]))
		else:
			print('PRINT ' + str(l[i]))
			print('LEFT')
elif d2 <= d1:
	for i in range(k):
		print('LEFT')
	for i in range(len(l)):
		if i == len(l) - 1:
			print('PRINT ' + str(l[i]))
		else:
			print('PRINT ' + str(l[i]))
			print('RIGHT')


(n, k) = map(int, input().split())
t = input()
if n - k >= k:
	for i in range(k - 1):
		print('LEFT')
	for i in range(n):
		print('PRINT', t[i])
		if i < n - 1:
			print('RIGHT')
else:
	t = t[::-1]
	for i in range(n - k):
		print('RIGHT')
	for i in range(n):
		print('PRINT', t[i])
		if i < n - 1:
			print('LEFT')


(n, k) = map(int, input().split())
banner = input()
if k <= (n + 1) // 2:
	while k > 1:
		print('LEFT')
		k -= 1
	while k < n:
		print('PRINT', banner[k - 1])
		print('RIGHT')
		k += 1
	print('PRINT', banner[k - 1])
else:
	while k < n:
		print('RIGHT')
		k += 1
	while k > 1:
		print('PRINT', banner[k - 1])
		print('LEFT')
		k -= 1
	print('PRINT', banner[k - 1])


(n, k) = map(int, input().split())
s = input()
left = False
if n - k < k - 1:
	left = True
	for i in range(k, n):
		print('RIGHT')
else:
	for i in range(k - 1):
		print('LEFT')
if left:
	for i in range(n - 1, -1, -1):
		print('PRINT ' + s[i])
		if i > 0:
			print('LEFT')
else:
	for i in range(n):
		print('PRINT ' + s[i])
		if i < n - 1:
			print('RIGHT')


__author__ = 'Lipen'

def main():
	(n, k) = map(int, input().split())
	s = input()
	answer = ''
	if k <= n - k:
		answer += 'LEFT\n' * (k - 1)
		for i in range(n - 1):
			answer += 'PRINT {}\n'.format(s[i])
			answer += 'RIGHT\n'
		answer += 'PRINT {}\n'.format(s[n - 1])
	else:
		answer += 'RIGHT\n' * (n - k)
		for i in range(n - 1, 0, -1):
			answer += 'PRINT {}\n'.format(s[i])
			answer += 'LEFT\n'
		answer += 'PRINT {}\n'.format(s[0])
	print(answer[:-1])
main()


(n, k) = input().split(' ')
n = int(n)
k = int(k)
s = input()
if k > n // 2:
	i = k - 1
	while i < n - 1:
		print('RIGHT')
		i += 1
	for i in reversed(range(1, n)):
		print('PRINT {}'.format(s[i]))
		print('LEFT')
	print('PRINT {}'.format(s[0]))
else:
	i = k - 1
	while i > 0:
		print('LEFT')
		i -= 1
	for i in range(n - 1):
		print('PRINT {}'.format(s[i]))
		print('RIGHT')
	print('PRINT {}'.format(s[n - 1]))


(n, k) = map(int, input().split())
s = input()
m = n // 2
if k <= m:
	for i in range(k - 1):
		print('LEFT')
	for i in range(len(s) - 1):
		print('PRINT', s[i], '\nRIGHT')
	print('PRINT', s[-1])
else:
	for i in range(len(s) - k):
		print('RIGHT')
	for i in range(len(s) - 1, 0, -1):
		print('PRINT', s[i], '\nLEFT')
	print('PRINT', s[0])


([n, k], slogan) = (map(int, input().split()), input().strip())
if 2 * k < n + 1:
	for x in range(k - 2, -1, -1):
		print('LEFT')
		print('PRINT', slogan[x])
	for x in range(k - 1):
		print('RIGHT')
	print('PRINT', slogan[k - 1])
	for x in range(k, n):
		print('RIGHT')
		print('PRINT', slogan[x])
else:
	for x in range(k, n):
		print('RIGHT')
		print('PRINT', slogan[x])
	for x in range(n - k):
		print('LEFT')
	print('PRINT', slogan[k - 1])
	for x in range(k - 2, -1, -1):
		print('LEFT')
		print('PRINT', slogan[x])


def main():
	[n, k] = [int(_) for _ in input().split()]
	slogan = input()
	if k != 1 and k != n:
		if k <= n - k + 1:
			for i in range(k - 1):
				print('LEFT')
			k = 0
		else:
			for i in range(n - k):
				print('RIGHT')
			k = n - 1
	else:
		k -= 1
	if k == 0:
		for i in range(n):
			print('PRINT ' + slogan[i])
			if i < n - 1:
				print('RIGHT')
	else:
		for i in range(n - 1, -1, -1):
			print('PRINT ' + slogan[i])
			if i > 0:
				print('LEFT')
main()


(n, k) = map(int, input().split())
s = input()

def goRight():
	i = k - 1
	while i < n - 1:
		print('RIGHT')
		i += 1
	i = n - 1
	while i >= 0:
		print('PRINT', s[i])
		if i:
			print('LEFT')
		i -= 1

def goLeft():
	i = k - 1
	while i > 0:
		print('LEFT')
		i -= 1
	i = 0
	while i < n:
		print('PRINT', s[i])
		if i != n - 1:
			print('RIGHT')
		i += 1
if (n + 1) // 2 < k or (k == n and k != 1):
	goRight()
else:
	goLeft()


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_int_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_int = lambda : int(sys.stdin.readline())
pt = lambda x: sys.stdout.write(str(x) + '\n')
(n, k) = get_int_list()
s = get_string()
if k == n:
	for i in range(n - 1):
		pt('PRINT ' + s[~i])
		pt('LEFT')
	pt('PRINT ' + s[0])
elif k == 1:
	for i in range(n - 1):
		pt('PRINT ' + s[i])
		pt('RIGHT')
	pt('PRINT ' + s[-1])
elif k - 1 < n - k:
	for i in range(k - 1):
		pt('LEFT')
	for i in range(n - 1):
		pt('PRINT ' + s[i])
		pt('RIGHT')
	pt('PRINT ' + s[-1])
else:
	for i in range(n - k):
		pt('RIGHT')
	for i in range(n - 1):
		pt('PRINT ' + s[~i])
		pt('LEFT')
	pt('PRINT ' + s[0])


(n, k) = map(int, input().split())
slogan = input()
banner = [None for n in range(0, n)]
if k <= n / 2:
	for i in range(k - 1, 0, -1):
		print('LEFT')
	for i in range(0, n):
		print('PRINT ' + slogan[i])
		if i < n - 1:
			print('RIGHT')
else:
	for i in range(k, n):
		print('RIGHT')
	for i in range(n - 1, -1, -1):
		print('PRINT ' + slogan[i])
		if i > 0:
			print('LEFT')


(n, pos) = [int(x) for x in input().split()]
s = input()
cnt = 0
if pos > n // 2:
	for i in range(n - pos):
		print('RIGHT')
		pos = n
	while cnt < n:
		print('PRINT {}'.format(s[pos - 1]))
		cnt += 1
		if n == cnt:
			break
		print('LEFT')
		pos -= 1
else:
	for i in range(pos - 1):
		print('LEFT')
		pos = 1
	while cnt < n:
		print('PRINT {}'.format(s[pos - 1]))
		cnt += 1
		if n == cnt:
			break
		print('RIGHT')
		pos += 1


(n, k) = map(int, input().split())
st = input()
if k <= n / 2:
	pos = -1
	for _ in range(k - 1):
		print('LEFT')
elif k > n / 2:
	pos = 1
	for _ in range(n - k):
		print('RIGHT')
if pos == -1:
	i = 0
	while i < n:
		print('PRINT', st[i])
		if i != n - 1:
			print('RIGHT')
		i += 1
else:
	i = 0
	while i < n:
		print('PRINT', st[-(i + 1)])
		if i != n - 1:
			print('LEFT')
		i += 1


data = input().split()
cant_caracteres = int(data[0])
pos_escalera = int(data[1])
l_character = []
for it in input():
	l_character.append(it)
medio = cant_caracteres // 2
if pos_escalera > medio:
	if pos_escalera != cant_caracteres:
		for i in range(pos_escalera - 1, cant_caracteres - 1):
			print('RIGHT')
	for i in range(cant_caracteres - 1, -1, -1):
		print('PRINT ' + l_character[i])
		if i != 0:
			print('LEFT')
else:
	if pos_escalera - 1 != 0:
		for i in range(pos_escalera - 1, 0, -1):
			print('LEFT')
	for i in range(0, cant_caracteres):
		print('PRINT ' + l_character[i])
		if i != cant_caracteres - 1:
			print('RIGHT')


(n, k) = map(int, input().split())
s = input()
count1 = 0
if n == k:
	for i in range(n - 1, -1, -1):
		print('PRINT', s[i])
		count1 += 1
		if count1 < n:
			print('LEFT')
elif k == 1:
	for j in range(n):
		print('PRINT', s[j])
		count1 += 1
		if count1 < n:
			print('RIGHT')
elif n - k < n // 2:
	while k < n:
		print('RIGHT')
		k += 1
	for x in range(n - 1, -1, -1):
		print('PRINT', s[x])
		count1 += 1
		if count1 < n:
			print('LEFT')
else:
	while k != 1:
		print('LEFT')
		k -= 1
	for y in range(n):
		print('PRINT', s[y])
		count1 += 1
		if count1 < n:
			print('RIGHT')


(n, k) = map(int, input().split())
a = input()
x = 0
if k > n // 2:
	x = 1
	k = n - k
	a = a[::-1]
else:
	k -= 1
if k:
	print(*[['LEFT', 'RIGHT'][x]] * k, sep='\n')
print(f'PRINT {a[0]}')
for i in range(1, n):
	print(['LEFT', 'RIGHT'][1 - x])
	print(f'PRINT {a[i]}')


(n, k) = map(int, input().split())
s = input()
i = k - 1
while i != 0 and i != n - 1:
	if n - i - 1 < i:
		i += 1
		print('RIGHT')
	else:
		i -= 1
		print('LEFT')
if i == 0:
	for x in range(n):
		print('PRINT', s[x])
		if x != n - 1:
			print('RIGHT')
else:
	for x in range(n - 1, -1, -1):
		print('PRINT', s[x])
		if x != 0:
			print('LEFT')


(n, k) = map(int, input().split())
s = input()
left = k - 1
right = n - k
if left < right:
	print('LEFT\n' * left, end='')
	for i in range(len(s) - 1):
		c = s[i]
		print('PRINT', c)
		print('RIGHT')
	print('PRINT', s[-1])
else:
	print('RIGHT\n' * right, end='')
	for i in range(len(s) - 1):
		c = s[-i - 1]
		print('PRINT', c)
		print('LEFT')
	print('PRINT', s[0])


(no_sq, pos) = map(int, input().split())
slogan = input()
left = pos - 1
right = no_sq - pos
if left > right:
	print('RIGHT\n' * right)
	flag = 0
	for i in slogan[::-1]:
		print('PRINT', i)
		if flag == no_sq - 1:
			break
		print('LEFT')
		flag += 1
else:
	print('LEFT\n' * left)
	flag = 0
	for i in slogan:
		print('PRINT', i)
		if flag == no_sq - 1:
			break
		print('RIGHT')
		flag += 1


(n, k) = map(int, input().split())
s = list(input())
if n - k < k - 1:
	for i in range(k - 1, n - 1):
		print('RIGHT')
	i = n - 1
	while i > 0:
		print('{} {}'.format('PRINT', s[i]))
		print('{}'.format('LEFT'))
		i -= 1
	print('{} {}'.format('PRINT', s[i]))
else:
	i = k - 1
	while i > 0:
		print('LEFT')
		i -= 1
	for i in range(0, n - 1):
		print('{} {}'.format('PRINT', s[i]))
		print('{}'.format('RIGHT'))
	print('{} {}'.format('PRINT', s[n - 1]))


way_dir = ['LEFT', 'RIGHT']
(n, k) = map(int, input().split())
daf = list(input())
if k > (n + 1) / 2:
	way = 1
else:
	way = 0
if way == 1:
	start_move = n - k
	daf = daf[::-1]
else:
	start_move = k - 1
for i in range(start_move):
	print(way_dir[way])
print('PRINT', daf[0])
for i in range(n - 1):
	print(way_dir[not way])
	print('PRINT', daf[i + 1])


(n, k) = map(int, input().split())
s = input()
(a, b) = ('LEFT', 'RIGHT')
if k + k > n:
	(a, b, k, s) = (b, a, n - k, s[::-1])
else:
	k -= 1
print('\n'.join([a] * k))
print('PRINT', s[0])
print('\n'.join((b + '\nPRINT ' + s[i] for i in range(1, n))))


(n, k) = map(int, input().split(' '))
slogan = input()

def begin():
	print('PRINT ' + slogan[0])
	for i in range(1, len(slogan)):
		print('RIGHT')
		print('PRINT ' + slogan[i])

def end():
	print('PRINT ' + slogan[-1])
	for i in range(2, len(slogan) + 1):
		print('LEFT')
		print('PRINT ' + slogan[-i])
mid = n // 2
if k == 1:
	begin()
elif k == n:
	end()
elif k > mid:
	diff = n - k
	for i in range(diff):
		print('RIGHT')
	end()
elif k < mid:
	diff = k - 1
	for i in range(diff):
		print('LEFT')
	begin()
elif mid == k:
	for i in range(mid - 1):
		print('LEFT')
	begin()