There are $n$ children, who study at the school №41. It is well-known that they are good mathematicians. Once at a break, they arranged a challenge for themselves. All children arranged in a row and turned heads either to the left or to the right.

Children can do the following: in one second several pairs of neighboring children who are looking at each other can simultaneously turn the head in the opposite direction. For instance, the one who was looking at the right neighbor turns left and vice versa for the second child. Moreover, every second at least one pair of neighboring children performs such action. They are going to finish when there is no pair of neighboring children who are looking at each other. 

You are given the number $n$, the initial arrangement of children and the number $k$. You have to find a way for the children to act if they want to finish the process in exactly $k$ seconds. More formally, for each of the $k$ moves, you need to output the numbers of the children who turn left during this move.

For instance, for the configuration shown below and $k = 2$ children can do the following steps:  [Image]  At the beginning, two pairs make move: $(1, 2)$ and $(3, 4)$. After that, we receive the following configuration:  [Image]  At the second move pair $(2, 3)$ makes the move. The final configuration is reached. Good job.  [Image] 

It is guaranteed that if the solution exists, it takes not more than $n^2$ "headturns".


-----Input-----

The first line of input contains two integers $n$ and $k$ ($2 \le n \le 3000$, $1 \le k \le 3000000$)  — the number of children and required number of moves.

The next line contains a string of length $n$ and consists only of characters L and R, where L means that the child looks to the left and R means that the child looks to the right. 


-----Output-----

If there is no solution, print a single line with number $-1$.

Otherwise, output $k$ lines. Each line has to start with a number $n_i$ ($1\le n_i \le \frac{n}{2}$)  — the number of pairs of children, who turn at this move. After that print $n_i$ distinct integers  — the numbers of the children who will turn left during this move. 

After performing all "headturns", there can't be a pair of two neighboring children looking at each other.

If there are many solutions, print any of them.


-----Examples-----
Input
2 1
RL

Output
1 1 

Input
2 1
LR

Output
-1
Input
4 2
RLRL

Output
2 1 3 
1 2



-----Note-----

The first sample contains a pair of children who look at each other. After one move, they can finish the process.

In the second sample, children can't make any move. As a result, they can't end in $k>0$ moves.

The third configuration is described in the statement.

Source: codeforces | Difficulty: MEDIUM


Solutions:
from __future__ import division, print_function
import os
import 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 main():
	(n, k) = [int(x) for x in input().split()]
	word = list(input())
	minimum = 0
	aux = 0
	maximum = 0
	complete = []
	mov = []
	t = True
	while t:
		aux += 1
		t = False
		i = n - 2
		while i >= 0:
			if word[i] == 'R' and word[i + 1] == 'L':
				maximum += 1
				mov.append(i + 1)
				minimum = max(minimum, aux)
				(word[i], word[i + 1]) = (word[i + 1], word[i])
				t = True
				i -= 1
			i -= 1
		complete.append(mov)
		mov = []
	if not minimum <= k <= maximum:
		print(-1)
	else:
		base = 1
		ans = []
		k2 = k
		for i in range(0, minimum):
			complete_aux = []
			for j in range(len(complete[i])):
				if maximum == k:
					complete_aux.append(complete[i][j])
					ans.append(complete_aux)
					complete_aux = []
					k -= 1
					maximum -= 1
				else:
					complete_aux.append(complete[i][j])
					maximum -= 1
			if len(complete_aux):
				ans.append(complete_aux)
				k -= 1
		for i in range(k2):
			print(len(ans[i]), end=' ')
			for j in range(len(ans[i])):
				print(ans[i][j], end=' ')
			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')

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()


from sys import stdin, gettrace
import traceback
if not gettrace():

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

def main():
	(n, k) = map(int, input().split())
	ss = list(input())
	rcount = 0
	lrun = 0
	plays = [[] for _ in range(n + 1)]
	pc = 0
	tc = 0
	for (i, s) in enumerate(ss):
		if s == 'R':
			lrun = max(lrun - 1, 0)
			rcount += 1
		else:
			for j in range(rcount):
				plays[lrun + j].append(i - j)
			pc = max(pc, lrun + rcount)
			lrun += 1
			tc += rcount
	if pc > k or tc < k:
		print(-1)
		return
	extra = k - pc
	prx = 0
	play = plays[prx]
	while len(play) <= extra:
		if len(play) > 0:
			print(1, '\n1 '.join(map(str, play)))
		extra -= len(play) - 1
		prx += 1
		play = plays[prx]
	for p in play[:extra]:
		print(1, p)
	if extra < len(play):
		print(len(play) - extra, ' '.join(map(str, play[extra:])))
	prx += 1
	for prx in range(prx, pc):
		play = plays[prx]
		print(len(play), ' '.join(map(str, play)))
try:
	main()
except Exception:
	print('Failed')
	print(traceback.format_exc())


(N, K) = map(int, input().split())
S = [1 if a == 'R' else 0 for a in input()]
t = 0
a = 0
for s in S:
	if s:
		a += 1
	else:
		t += a
if K > t:
	print(-1)
	exit()
X = []
while True:
	Y = [i for i in range(N - 1) if S[i] and (not S[i + 1])]
	if not len(Y):
		break
	X.append(Y)
	nS = [0] * N
	i = N - 1
	while i >= 0:
		if S[i - 1] and (not S[i]) and i:
			nS[i] = 1
			i -= 2
		elif S[i]:
			nS[i] = 1
			i -= 1
		else:
			i -= 1
	S = nS
u = len(X)
if K < u:
	print(-1)
	exit()
p1 = lambda x: [y + 1 for y in x]
st = lambda x: ' '.join(map(str, x))
ANS = []
K -= u
i = 0
for x in X:
	for (j, xx) in enumerate(x):
		if K:
			ANS.append(st([1, xx + 1]))
			if j < len(x) - 1:
				K -= 1
		else:
			ANS.append(st([len(x) - j] + p1(x[j:])))
			break
strANS = '\n'.join(ANS)
print(strANS)


import sys
from collections import deque

def solve(N, K, S):
	levels = deque()
	while True:
		indices = [i for (i, pair) in enumerate(zip(S, S[1:])) if pair == ('R', 'L')]
		if not indices:
			break
		levels.append(indices)
		S = S.replace('RL', 'LR')
	shortest = len(levels)
	longest = sum((len(indices) for indices in levels))
	if not shortest <= K <= longest:
		return -1

	def formatLine(indices):
		return str(len(indices)) + ' ' + ' '.join((str(i + 1) for i in indices))
	ans = []
	while len(ans) + len(levels) < K:
		line = [levels[0].pop()]
		if not levels[0]:
			levels.popleft()
		ans.append(formatLine(line))
	for line in levels:
		ans.append(formatLine(line))
	return '\n'.join(ans)
input = sys.stdin.readline
(N, K) = [int(x) for x in input().split()]
S = input().rstrip()
ans = solve(N, K, S)
print(ans)


(n, k) = map(int, input().split())
s = list(input())
mn = 0
mx = 0
mvs = []
for i in range(n):
	j = 0
	mvs.append([])
	while j < n - 1:
		if s[j] == 'R' and s[j + 1] == 'L':
			(s[j], s[j + 1]) = ('L', 'R')
			mvs[-1].append(j)
			j += 2
			mx += 1
		else:
			j += 1
	if len(mvs[-1]) == 0:
		break
if len(mvs[-1]) == 0:
	mvs = mvs[:-1]
mn = len(mvs)
if k < mn or k > mx:
	print(-1)
	exit()
(i, j) = (0, 0)
ans = []
for b in range(k):
	if k - b > mn - i:
		ans.append('1 {}'.format(mvs[i][j] + 1))
		j += 1
		if j == len(mvs[i]):
			i += 1
			j = 0
	else:
		p = mvs[i][j:]
		ans.append('{} {}'.format(len(p), ' '.join([str(kk + 1) for kk in p])))
		i += 1
		j = 0
print('\n'.join(ans))


import sys
input = sys.stdin.readline
(n, k) = map(int, input().split())
arrangement = [i for i in input() if i != '\n']
store = []
(mina, maxa) = (0, 0)
while True:
	reverse = []
	for i in range(n - 1):
		if arrangement[i] == 'R' and arrangement[i + 1] == 'L':
			reverse.append(i + 1)
	if len(reverse) == 0:
		break
	store.append(reverse)
	mina += 1
	maxa += len(reverse)
	for z in reverse:
		arrangement[z] = 'R'
		arrangement[z - 1] = 'L'
if mina <= k <= maxa:
	for i in range(len(store)):
		if k - (i + 1) <= maxa - len(store[i]):
			maxa -= len(store[i])
			length = len(store[i])
			store[i] = ' '.join(map(str, store[i]))
			if length > 0:
				sys.stdout.write(str(length) + ' ' + store[i] + '\n')
		else:
			if maxa - k + i + 1 > 0:
				pq = ' '.join(map(str, store[i][:maxa - k + i + 1]))
				sys.stdout.write(str(maxa - k + i + 1) + ' ' + pq + '\n')
			for jk in range(maxa - k + i + 1, len(store[i])):
				sys.stdout.write(str(1) + ' ' + str(store[i][jk]) + '\n')
			break
	for ijk in range(i + 1, len(store)):
		for jki in store[ijk]:
			sys.stdout.write(str(1) + ' ' + str(jki) + '\n')
else:
	sys.stdout.write(str(-1) + '\n')


import sys
input = sys.stdin.readline

def print(s):
	return sys.stdout.write(s + '\n')
(n, k) = map(int, input().split())
a = [1 if x == 'R' else 0 for x in input().strip()]
steps = []
while True:
	steps.append([i for i in range(n - 1) if a[i] == 1 and a[i + 1] == 0])
	for i in steps[-1]:
		(a[i], a[i + 1]) = (0, 1)
	if not steps[-1]:
		del steps[-1]
		break
if not len(steps) <= k <= sum((len(s) for s in steps)):
	print('-1')
	sys.exit(0)
need_more = k - len(steps)
for step in steps:
	if need_more == 0:
		print(str(len(step)) + ' ' + ' '.join(map(lambda x: str(x + 1), step)))
	elif need_more >= len(step) - 1:
		for x in step[::-1]:
			print('1 ' + str(x + 1))
		need_more -= len(step) - 1
	else:
		for x in step[::-1][:need_more]:
			print('1 ' + str(x + 1))
		print(str(len(step[::-1][need_more:])) + ' ' + ' '.join(map(lambda x: str(x + 1), step[::-1][need_more:])))
		need_more = 0


import sys
input = sys.stdin.readline
(n, k) = map(int, input().split())
s = input().rstrip()
ss = []
for i in range(n):
	if s[i] == 'L':
		ss.append(i)
ansl = [[]]
cntl = 0
cntu = 0
if not ss:
	print(-1)
	exit()
while ss[-1] != len(ss) - 1:
	for i in range(len(ss))[::-1]:
		if ss[i] == i:
			continue
		if i == 0:
			ss[i] -= 1
			cntu += 1
			ansl[-1].append(ss[i] + 1)
		elif ss[i] > ss[i - 1] + 1:
			ss[i] -= 1
			cntu += 1
			ansl[-1].append(ss[i] + 1)
	cntl += 1
	ansl.append([])
if not cntl <= k <= cntu:
	print(-1)
	exit()
ans = []
for i in range(len(ansl) - 1):
	while ansl[i] and cntl < k:
		ans.append(ansl[i].pop())
		k -= 1
	if cntl == k and ansl[i]:
		break
	cntl -= 1
for arr in ansl:
	if arr:
		ans.append(arr)
for i in ans:
	if type(i) == int:
		sys.stdout.write('1 ' + str(i) + '\n')
	else:
		print(len(i), *i)


from __future__ import division, print_function
import os
import 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 main():
	(n, k) = [int(x) for x in input().split()]
	data = input()
	(qtd_min, qtd_max) = (0, 0)
	mov = []
	while 'RL' in data:
		qtd_min += 1
		qtd_max += data.count('RL')
		data_aux = data.replace('RL', 'LR')
		mov.append([i for (i, (new, old)) in enumerate(zip(data_aux, data), 1) if new == 'L' and old == 'R'])
		data = data_aux
	if not qtd_min <= k <= qtd_max:
		print(-1)
	else:
		mov = mov[::-1]
		while k:
			if k > len(mov):
				print(1, mov[-1].pop())
				if not mov[-1]:
					mov.pop()
			else:
				print(len(mov[-1]), ' '.join((str(x) for x in mov[-1])))
				mov.pop()
			k -= 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()


(n, k) = map(int, input().split())
in_ = input()
arr = []
S = 0
s = [1 if x == 'R' else 0 for x in in_]
while True:
	next_ = [i for i in range(n - 1) if s[i] == 1 and s[i + 1] == 0]
	if len(next_) == 0:
		break
	arr.append(next_)
	S += len(next_)
	for pos in next_:
		s[pos] = 0
		s[pos + 1] = 1
if S < k or k < len(arr):
	print(-1)
else:
	r = S - k
	for a in arr:
		n_ = len(a) - 1
		if r >= n_:
			print(str(n_ + 1) + ' ' + ' '.join([str(x + 1) for x in a]))
			r -= n_
		else:
			print(str(r + 1) + ' ' + ' '.join([str(x + 1) for x in a[:r + 1]]))
			for x in a[r + 1:]:
				print(str(1) + ' ' + str(x + 1))
			r = 0


from sys import stdin, stdout
input = stdin.readline
print = stdout.write
R = lambda : list(map(int, input().split()))
(n, k) = R()
s = list('0' + input())
lk = []
lk.append([i for i in range(1, n) if s[i] == 'R' and s[i + 1] == 'L'])
(p, sm) = (0, len(lk[0]))
while True:
	nx = []
	for i in lk[p]:
		s[i] = 'L'
		s[i + 1] = 'R'
	for i in lk[p]:
		if i > 1 and s[i - 1] == 'R' and (not nx or nx[-1] != i - 1):
			nx.append(i - 1)
		if i + 1 < n and s[i + 2] == 'L':
			nx.append(i + 1)
	if not nx:
		break
	lk.append(nx)
	p += 1
	sm += len(nx)
	if sm > n * n:
		break
if sm < k or k < len(lk):
	print('-1\n')
	exit()
dis = k - len(lk)
for ls in lk:
	i = 0
	while i < len(ls) - 1 and dis > 0:
		print('1 ' + str(ls[i]) + '\n')
		dis -= 1
		i += 1
	print(str(len(ls[i:])) + ' ' + ' '.join(map(str, ls[i:])) + '\n')


import sys

def print(s):
	return sys.stdout.write(s + '\n')
(n, k) = map(int, input().split())
s = list(input())
mn = 0
mx = 0
mvs = []
for i in range(n):
	j = 0
	mvs.append([])
	while j < n - 1:
		if s[j] == 'R' and s[j + 1] == 'L':
			(s[j], s[j + 1]) = ('L', 'R')
			mvs[-1].append(j)
			j += 2
			mx += 1
		else:
			j += 1
	if len(mvs[-1]) == 0:
		break
if len(mvs[-1]) == 0:
	mvs = mvs[:-1]
mn = len(mvs)
if k < mn or k > mx:
	print('-1')
	exit()
(i, j) = (0, 0)
ans = []
for b in range(k):
	if k - b > mn - i:
		ans.append('1 {}'.format(mvs[i][j] + 1))
		j += 1
		if j == len(mvs[i]):
			i += 1
			j = 0
	else:
		p = mvs[i][j:]
		ans.append('{} {}'.format(len(p), ' '.join([str(kk + 1) for kk in p])))
		i += 1
		j = 0
for an in ans:
	print(an)


import sys
input = sys.stdin.readline
(n, k) = map(int, input().split())
S = input().strip()
RS = 0
MAX = 0
for s in S:
	if s == 'R':
		RS += 1
	else:
		MAX += RS
if MAX < k:
	print(-1)
	sys.exit()
ANS = []

def oneope(S, MAX):
	ind = 0
	NS = ''
	A = []
	flag = 0
	while ind < n:
		if MAX == k:
			NS += S[ind:]
			break
		if flag == 0 and ind < n - 1 and (S[ind] == 'R') and (S[ind + 1] == 'L'):
			NS += 'LR'
			A.append(ind + 1)
			ind += 2
			flag = 1
		elif flag and ind < n - 1 and (S[ind] == 'R') and (S[ind + 1] == 'L'):
			MAX -= 1
			NS += 'LR'
			A.append(ind + 1)
			ind += 2
		else:
			NS += S[ind]
			ind += 1
	return (MAX, NS, A, flag)
while MAX > k:
	(MAX, S, A, flag) = oneope(S, MAX)
	if flag == 0:
		print(-1)
		sys.exit()
	else:
		ANS.append(A)
for alist in ANS:
	L = len(alist)
	sys.stdout.write(str(L) + ' ')
	sys.stdout.write(' '.join(map(str, alist)) + '\n')
RS = 0
for i in range(n):
	if S[i] == 'R':
		RS += 1
	else:
		for j in range(i, i - RS, -1):
			sys.stdout.write('1 ' + str(j) + '\n')


from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase

def main():
	(n, k) = [int(s) for s in input().strip().split()]
	s = input().strip()
	(tmin, tmax) = (0, 0)
	steps = []
	while 'RL' in s:
		tmin += 1
		tmax += s.count('RL')
		s2 = s.replace('RL', 'LR')
		steps.append([i for (i, (a, b)) in enumerate(zip(s, s2), 1) if a == 'R' and b == 'L'])
		s = s2
	if not tmin <= k <= tmax:
		print(-1)
		return
	steps = steps[::-1]
	while k:
		if k > len(steps):
			print(1, steps[-1].pop())
			if not steps[-1]:
				steps.pop()
		else:
			print(len(steps[-1]), ' '.join((str(x) for x in steps[-1])))
			steps.pop()
		k -= 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 f():
	d = {'L': 0, 'R': 1}
	(n, k) = [int(s) for s in input().split()]
	A = [d[s] for s in input()]
	best = []
	notFin = 1
	while notFin:
		notFin = 0
		sec = []
		i = 1
		while i < n:
			if A[i - 1] > A[i]:
				sec.append(i - 1)
				(A[i - 1], A[i]) = (0, 1)
				notFin = 1
				i += 1
			i += 1
		best.append(sec)
	best.pop()
	maxOp = 0
	for p in best:
		maxOp += len(p)
	if k < len(best) or k > maxOp:
		print(-1)
		return
	ans = list()
	rem = k - len(best)
	(w, p) = (0, 0)
	while rem > 0:
		ans.append('1 ' + str(best[w][p] + 1) + '\n')
		rem -= 1
		p += 1
		if p == len(best[w]):
			p = 0
			w += 1
			rem += 1
	while w < len(best):
		ans.append(str(len(best[w]) - p) + ' ')
		while p < len(best[w]):
			ans.append(str(best[w][p] + 1) + ' ')
			p += 1
		ans.append('\n')
		w += 1
		p = 0
	print(''.join(ans))
f()


import sys
input = sys.stdin.readline
(n, k) = map(int, input().split())
s = list(input().strip())
changes = []
bad = 0
for i in range(n + 1):
	j = 0
	changes.append([])
	while j < n - 1:
		if s[j:j + 2] == ['R', 'L']:
			changes[-1].append(j + 1)
			(s[j], s[j + 1]) = (s[j + 1], s[j])
			j += 1
		j += 1
	if len(changes[-1]) == 0:
		changes.pop()
		break
if sum(map(len, changes)) < k or len(changes) > k:
	print(-1)
else:
	ans = []
	for (i, x) in enumerate(changes):
		if k == len(changes) - i:
			ans.append(str(len(x)) + ' ' + ' '.join(map(str, x)) + '\n')
			k -= 1
			continue
		for (j, y) in enumerate(x):
			if k > len(changes) - i:
				ans.append('1 ' + str(y) + '\n')
				k -= 1
			else:
				ans.append(str(len(x[j:])) + ' ' + ' '.join(map(str, x[j:])) + '\n')
				k -= 1
				break
	print(''.join(ans))


import sys
(n, k) = (int(i) for i in input().split())
s = list(input())
ans = []
count = 0
for i in range(n):
	moves = []
	for i in range(n - 1):
		if s[i] == 'R' and s[i + 1] == 'L':
			moves.append(i)
			count += 1
	for i in moves:
		(s[i], s[i + 1]) = (s[i + 1], s[i])
	if not moves:
		break
	ans.append(moves)
if k > count or k < len(ans):
	print(-1)
	sys.exit(0)
k -= len(ans)
out = []
for moves in ans:
	for i in range(len(moves) - 1):
		if k > 0:
			out.append(f'1 {moves.pop() + 1}\n')
			k -= 1
		else:
			break
	out.append(f'{len(moves)} ' + ' '.join((str(i + 1) for i in moves)) + '\n')
print(''.join(out))


from bisect import bisect_left as bl, bisect_right as br, insort
import sys
import heapq
from collections import defaultdict as dd, deque

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

def mdata():
	return map(int, data().split())
mod = int(1000000000.0 + 7)
(n, k) = mdata()
s = list(data())
s1 = s.copy()
l = []
cnt1 = cnt2 = 0
flag = True
while flag:
	flag = False
	l.append([])
	for i in range(n - 1):
		if s[i] == 'R' and s[i + 1] == 'L':
			flag = True
			s1[i] = 'L'
			s1[i + 1] = 'R'
			l[-1].append(i + 1)
			cnt2 += 1
	if flag == False:
		break
	s = s1.copy()
	cnt1 += 1
l.pop()
if k > cnt2 or k < cnt1:
	print(-1)
else:
	ans = []
	t = k - cnt1
	i = 0
	j = 0
	while t:
		if len(l[i]) == 0:
			i += 1
		if len(l[i]) == 1:
			ans.append('1 ' + str(l[i].pop()))
			i += 1
			continue
		ans.append('1 ' + str(l[i].pop()))
		t -= 1
	if len(l[i]) == 0:
		i += 1
	for j in range(i, cnt1):
		s = str(len(l[j]))
		for k in range(len(l[j])):
			s += ' ' + str(l[j][k])
		ans.append(s)
	print('\n'.join(ans))


import sys
lines = sys.stdin.readlines()
(n, k) = map(int, lines[0].strip().split(' '))
string = lines[1].strip()
a = [0 for _ in range(n)]
Ls = []
for i in range(n - 1, -1, -1):
	if string[i] == 'R':
		a[i] = 1
	else:
		Ls.append(i + 1)
(maxi, mini) = (0, 0)
cnt = 0
last = -1
for i in range(n - 1, -1, -1):
	if a[i] == 0:
		cnt += 1
	else:
		if cnt == 0:
			continue
		maxi += cnt
		mini = max(cnt, last + 1)
		last = mini
end = 1
if k < mini or k > maxi:
	print(-1)
else:
	while maxi > k:
		c = 0
		cache = []
		for i in range(len(Ls) - 1):
			if Ls[i + 1] != Ls[i] - 1:
				c += 1
				Ls[i] -= 1
				cache.append(Ls[i])
		if Ls[-1] != end:
			Ls[-1] -= 1
			cache.append(Ls[-1])
			c += 1
		if Ls[-1] == end:
			Ls.pop()
			end += 1
		if maxi - c >= k - 1:
			print('{} {}'.format(c, ' '.join(map(str, cache))))
			maxi -= c
			k -= 1
		else:
			tmp = maxi - k + 1
			print('{} {}'.format(tmp, ' '.join(map(str, cache[:tmp]))))
			for i in range(tmp, c):
				print('{} {}'.format(1, cache[i]))
			break
	for l in Ls[::-1]:
		for i in range(l - 1, end - 1, -1):
			print('1 {}'.format(i))
		end += 1


import sys
inp = sys.stdin.readline

def input():
	return inp().strip()
flush = sys.stdout.flush

def iin():
	return int(input())

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

def lts(a, sep=''):
	return '{}'.format(sep).join(a)

def main():
	T = 1
	for _ in range(T):
		(n, k) = lin()
		s = input()
		a = [1 if i == 'R' else 0 for i in s]
		todo = []
		ans = []
		for i in range(n - 1):
			if a[i] == 1 and a[i + 1] == 0:
				todo.append(i)
		a2 = 0
		while todo:
			ans.append([i + 1 for i in todo])
			a2 += len(todo)
			t1 = []
			for i in reversed(todo):
				a[i] = 0
				a[i + 1] = 1
				if i > 0 and a[i - 1] == 1:
					t1.append(i - 1)
				if i + 2 < n and a[i + 2] == 0:
					t1.append(i + 1)
			todo = t1
		a1 = len(ans)
		if a1 <= k <= a2:
			out = []
			a2 = k - a1
			for i in ans:
				l = len(i)
				(c1, c2) = ([], [])
				x = min(l - 1, a2)
				c1 = i[:l - x]
				c2 = i[l - x:]
				a2 -= x
				out.append('{} {}'.format(len(c1), ' '.join([str(i) for i in c1])))
				for j in c2:
					out.append('{} {}'.format(1, j))
			print(lts(out, '\n'))
		else:
			print(-1)
			exit()
main()


import sys
input = sys.stdin.readline
(n, k) = map(int, input().split())
S = list(input().rstrip())
lb = ub = 0
heads = []
while True:
	tmp = []
	for i in range(n - 1):
		if (S[i], S[i + 1]) == ('R', 'L'):
			tmp.append(i + 1)
	if not tmp:
		break
	lb += 1
	ub += len(tmp)
	heads.append(tmp)
	for i in tmp:
		(S[i - 1], S[i]) = ('L', 'R')
if lb <= k <= ub:
	k -= lb
	ans = []
	for t in heads:
		while k > 0 and len(t) > 1:
			ans.append('1 ' + str(t.pop()) + '\n')
			k -= 1
		ans.append(str(len(t)) + ' ' + ' '.join(map(str, t)) + '\n')
	print(''.join(ans))
else:
	print(-1)


import sys
input = sys.stdin.readline
(n, k) = map(int, input().split())
s = list(input().rstrip())
ans = []
while True:
	ok = True
	epoch = []
	for (i, (s1, s2)) in enumerate(zip(s, s[1:])):
		if s1 == 'R' and s2 == 'L':
			epoch.append(i + 1)
			ok = False
	if ok:
		break
	ans.append(epoch)
	for item in epoch:
		(s[item - 1], s[item]) = (s[item], s[item - 1])
minima = len(ans)
maxima = 0
for line in ans:
	maxima += len(line)
if k < minima or k > maxima:
	print(-1)
	exit()
skip = k - minima
ans_str = []
for line in ans:
	if skip == 0:
		ans_str.append(str(len(line)) + ' ' + ' '.join([str(item) for item in line]))
		continue
	val = min(skip, len(line) - 1)
	for _ in range(val):
		item = line.pop()
		ans_str.append('1 ' + str(item))
	skip -= val
	if line:
		ans_str.append(str(len(line)) + ' ' + ' '.join([str(item) for item in line]))
print('\n'.join(ans_str))


import sys, io, os
BUFSIZE = 8192

class FastIO(io.IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = io.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(io.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()
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
inputt = lambda t=0: range(t) if t else range(int(input()))
inputi = lambda : map(int, input().split())
inputl = lambda : list(inputi())
from re import *
from math import *
from heapq import *
from bisect import *
from functools import reduce, lru_cache
from collections import Counter, defaultdict
from builtins import *

def main():

	def C():
		i = 0
		t = False
		L = []
		for i in range(n):
			if t:
				if not S[i]:
					L.append(i)
					S[i - 1] = False
					S[i] = True
					t = False
			elif S[i]:
				t = True
		return L
	for _ in inputt(1):
		(n, k) = inputi()
		S = [c == 'R' for c in input().strip()]
		A = []
		t = 0
		l = C()
		while l:
			A.append(l)
			t += len(l)
			l = C()
		if not len(A) <= k <= t:
			print(-1)
			break
		k -= len(A)
		i = j = 0
		while k:
			print(1, A[i][j])
			j += 1
			if j == len(A[i]):
				j = 0
				i += 1
			else:
				k -= 1
		if j:
			print(len(A[i][j:]), *A[i][j:])
			i += 1
		while i < len(A):
			print(len(A[i]), *A[i])
			i += 1
main()


import os
import sys
from io import BytesIO, IOBase
mod = 1000000007

def main():
	(n, k) = [int(j) for j in input().split()]
	s = list(input().strip())
	k_t = dict()
	ls = []
	for i in range(n - 1):
		if s[i] + s[i + 1] == 'RL':
			ls.append(i)
	for j in ls:
		s[j] = 'L'
		s[j + 1] = 'R'
	total_head_turns = len(ls)
	main_ls = []
	main_ls.append(ls)
	while ls:
		new_ls = []
		tr = set()
		for i in ls:
			tr.add(max(i - 1, 0))
			tr.add(min(i + 1, n - 1))
		for j in tr:
			if j != n - 1:
				if s[j] + s[j + 1] == 'RL':
					new_ls.append(j)
		for j in new_ls:
			s[j] = 'L'
			s[j + 1] = 'R'
		ls = new_ls
		if new_ls:
			main_ls.append(new_ls)
		total_head_turns += len(new_ls)
	if total_head_turns < k:
		print('-1')
	else:
		try:
			ls = main_ls
			d = dict()
			for i in range(1, k + 1):
				d[i] = []
			curr = 0
			curr_ind = 0
			i = 0
			steps = 1
			compensate = total_head_turns - k
			while i < total_head_turns:
				ini_curr = curr
				left = ls[curr][curr_ind]
				k += 1
				d[steps].append(left)
				curr_ind += 1
				i += 1
				while compensate > 0 and curr_ind < len(ls[curr]):
					left = ls[curr][curr_ind]
					k += 1
					d[steps].append(left)
					curr_ind += 1
					i += 1
					compensate -= 1
				steps += 1
				if curr_ind > len(ls[curr]) - 1:
					curr += 1
					curr_ind = 0
			for i in d:
				san = str(len(d[i])) + ' '
				for j in d[i]:
					san += str(j + 1) + ' '
				print(san)
		except:
			print('-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()


(n, k) = map(int, input().split())
a = list(input())
(ans, cnt) = (list(list()), 0)
while True:
	cur = list()
	for i in range(n - 1):
		if a[i] == 'R' and a[i + 1] == 'L':
			cur.append(i)
			cnt += 1
	if len(cur) > 0:
		ans.append(cur.copy())
		for i in cur:
			(a[i], a[i + 1]) = (a[i + 1], a[i])
	else:
		break
if len(ans) > k or cnt < k:
	print(-1)
else:
	lst = list()
	dumb = k - len(ans)
	(w, p) = (0, 0)
	while dumb > 0:
		lst.append('1 ' + str(ans[w][p] + 1) + '\n')
		dumb -= 1
		p += 1
		if p == len(ans[w]):
			p = 0
			w += 1
			dumb += 1
	while w < len(ans):
		lst.append(str(len(ans[w]) - p) + ' ')
		while p < len(ans[w]):
			lst.append(str(ans[w][p] + 1) + ' ')
			p += 1
		lst.append('\n')
		w += 1
		p = 0
	print(''.join(lst))


from __future__ import division, print_function
import os
import 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
len_rights = 0
finish_index = 0

def main():
	global finish_index, len_rights
	a = 1
	(n, k) = map(int, input().split())
	arr = ['<' if c is 'L' else '>' for c in input()]
	lefts = [i + 1 for i in range(len(arr)) if arr[i] == '<']
	if lefts:
		finish_index = max(lefts)
	else:
		print(-1)
		exit()
	rights = [i + 1 for i in range(len(arr)) if arr[i] == '>' and i < finish_index]

	def while_rights():
		global finish_index, len_rights
		swap_this_step = []
		for (i, right) in enumerate(rights):
			if i != len_rights - 1:
				if rights[i + 1] != right + 1:
					rights[i] = right + 1
					swap_this_step.append(right)
			else:
				rights[i] = right + 1
				swap_this_step.append(right)
				if finish_index == rights[i]:
					finish_index -= 1
					rights.pop()
					len_rights -= 1
		swaps_all_step.append(swap_this_step)
	swaps_all_step = []
	len_rights = len(rights)
	while rights:
		while_rights()
	if k < len(swaps_all_step):
		print(-1)
		exit()
	elif k == len(swaps_all_step):
		pass
	else:
		diff = k - len(swaps_all_step)
		new_steps = []
		while diff:
			if not swaps_all_step:
				print(-1)
				exit()
			if len(swaps_all_step[-1]) >= 2:
				splitted = swaps_all_step[-1].pop()
				new_steps.append([splitted])
				diff -= 1
			else:
				new_steps.append(swaps_all_step.pop())
		new_steps.reverse()
		swaps_all_step.extend(new_steps)
	output = []
	swaps_all_step.reverse()
	while swaps_all_step:
		step = swaps_all_step.pop()
		output.append(str(len(step)) + ' ' + ' '.join(map(str, step)))
	print('\n'.join(output))
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 = sys.stdin.readline
(N, K) = map(int, input().split())
S = input()[:-1]
max_k = 0
cnt_r = 0
for c in S:
	if c == 'L':
		max_k += cnt_r
	else:
		cnt_r += 1
if max_k < K:
	print(-1)
	exit()
T = list(S)
Ans = []
Check = []
for i in range(N - 1):
	if T[i] == 'R' and T[i + 1] == 'L':
		Check.append((i, K))
rem_turn = max_k
rem_second = K
idx_Check = 0
idx_Check_r = 0
for i in range(1, K + 1):
	rem_second -= 1
	ans = []
	while True:
		(idx, time) = Check[idx_Check]
		if time == rem_second:
			break
		idx_Check += 1
		T[idx] = 'L'
		T[idx + 1] = 'R'
		rem_turn -= 1
		ans.append(str(idx + 1))
		if 1 <= idx and T[idx - 1] == 'R':
			Check.append((idx - 1, rem_second))
		if idx + 2 < N and T[idx + 2] == 'L':
			Check.append((idx + 1, rem_second))
		if rem_turn == rem_second:
			break
	Ans.append(str(len(ans)) + ' ' + ' '.join(ans))
if rem_turn != 0:
	print(-1)
else:
	print('\n'.join(Ans))


from math import factorial
from collections import Counter, defaultdict
from heapq import heapify, heappop, heappush
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 N():
	return int(input())

def comb(n, m):
	return factorial(n) / (factorial(m) * factorial(n - m)) if n >= m else 0

def perm(n, m):
	return factorial(n) // factorial(n - m) if n >= m else 0

def mdis(x1, y1, x2, y2):
	return abs(x1 - x2) + abs(y1 - y2)
mod = 1000000007
INF = float('inf')

def main():
	(n, k) = RL()
	arr = list(input())
	num = 0
	res = []
	while True:
		now = 0
		ns = []
		i = 0
		while i < n - 1:
			if arr[i] == 'R' and arr[i + 1] == 'L':
				(arr[i], arr[i + 1]) = ('L', 'R')
				ns.append(i + 1)
				now += 1
				i += 2
				continue
			i += 1
		num += now
		if now == 0:
			break
		res.append(ns)
	if num < k or len(res) > k:
		print(-1)
	else:
		res = res[::-1]
		while k > 0:
			if k > len(res):
				print(1, res[-1].pop())
				if not res[-1]:
					res.pop()
			else:
				print(len(res[-1]), *res.pop())
			k -= 1
main()