#include <bits/stdc++.h>
using namespace std;
int get_i() {
  char c = getchar();
  bool neg = false;
  for (; c < '0' || '9' < c; c = getchar())
    if (c == '-') neg = true;
  int rs = c - '0';
  c = getchar();
  for (; '0' <= c && c <= '9'; c = getchar())
    rs = (rs << 1) + (rs << 3) + (c - '0');
  if (neg) rs = -rs;
  return rs;
}
void print_i(int _n) {
  bool neg = false;
  if (_n < 0) {
    neg = true;
    _n = -_n;
  }
  if (neg) putchar('-');
  int N = _n, rev, count = 0;
  rev = N;
  if (N == 0) {
    putchar('0');
    return;
  }
  while ((rev % 10) == 0) {
    count++;
    rev /= 10;
  }
  rev = 0;
  while (N != 0) {
    rev = (rev << 3) + (rev << 1) + N % 10;
    N /= 10;
  }
  while (rev != 0) {
    putchar(rev % 10 + '0');
    rev /= 10;
  }
  while (count--) putchar('0');
}
int n, k, sum;
bool s[3005];
vector<vector<int> > ans;
char c;
int main() {
  n = get_i(), k = get_i(), sum = 0;
  for (int i = 0; i < n; i++) {
    for (; c != 'L' && c != 'R'; c = getchar())
      ;
    s[i] = (c == 'R');
    c = getchar();
  }
  for (;;) {
    vector<int> nw;
    bool thereIsAnother = false;
    for (int i = 0; i < n - 1; i++)
      if (s[i] && !s[i + 1]) {
        thereIsAnother = true;
        nw.push_back(i + 1);
        swap(s[i], s[i + 1]);
        i++;
      }
    if (!thereIsAnother) break;
    sum += nw.size();
    ans.push_back(nw);
  }
  if (ans.size() > k || sum < k) {
    cout << -1 << endl;
    return 0;
  }
  int cnt = k - ans.size();
  for (vector<int> nw : ans) {
    int sznw;
    for (sznw = nw.size(); cnt > 0 && sznw > 1; cnt--, sznw--)
      putchar('1'), putchar(' '), print_i(nw[sznw - 1]), putchar('\n');
    print_i(sznw), putchar(' ');
    for (int i = 0; i < sznw; i++) print_i(nw[i]), putchar(' ');
    putchar('\n');
  }
  return 0;
}
