#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  int numLev = 0, countL = 0, last = -1;
  for (int i = n - 1; i >= 0; i--) {
    if (s[i] == 'L')
      countL++;
    else {
      numLev = max(countL, last + 1);
      last = numLev;
    }
  }
  int numPairs = 0;
  int countR = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'R')
      countR++;
    else
      numPairs += countR;
  }
  int numLR = 0;
  std::queue<int> lr;
  for (int i = 0; i < n - 1; i++) {
    if (s[i + 1] == 'L' && s[i] == 'R') {
      numLR++;
      lr.push(i);
    }
  }
  if (k > numPairs || k < numLev) {
    cout << -1;
    return 0;
  }
  bool found = false;
  while (k) {
    if (k - 1 <= numPairs - numLR) {
      numPairs -= numLR;
      k--;
      cout << numLR << ' ';
      for (int i = 0; i < numLR; i++) {
        int el = lr.front();
        lr.pop();
        cout << el + 1 << ' ';
        swap(s[el], s[el + 1]);
        if (el > 0 && s[el - 1] == 'R') lr.push(el - 1);
        if (el + 2 < n && s[el + 2] == 'L') lr.push(el + 1);
      }
      if (found)
        numLR = 1;
      else
        numLR = lr.size();
    } else {
      int numCurrMove = numPairs - k + 1;
      cout << numCurrMove << ' ';
      k--;
      numPairs = k;
      numLR = 1;
      for (int i = 0; i < numCurrMove; i++) {
        int el = lr.front();
        lr.pop();
        cout << el + 1 << ' ';
        swap(s[el], s[el + 1]);
        if (el > 0 && s[el - 1] == 'R') lr.push(el - 1);
        if (el + 2 < n && s[el + 2] == 'L') lr.push(el + 1);
      }
      found = true;
    }
    cout << '\n';
  }
  return 0;
}
