#include <bits/stdc++.h>
using namespace std;
const int N = 3e3 + 7;
char buff[N];
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  scanf(" %s", buff);
  string str = (string)buff;
  vector<vector<int> > vec;
  while (1) {
    vector<int> tmp;
    for (int i = 0; i < n - 1; i++) {
      if (str.substr(i, 2) == "RL") {
        swap(str[i], str[i + 1]);
        i++;
        tmp.push_back(i);
      }
    }
    if (tmp.empty()) break;
    vec.push_back(tmp);
  }
  if (k < (int)vec.size()) {
    printf("-1\n");
    return 0;
  }
  int x = k - (int)vec.size();
  vector<vector<int> > ans;
  for (auto tmp : vec) {
    vector<int> dada;
    for (auto v : tmp) {
      if (x) {
        ans.push_back({v});
        x--;
      } else
        dada.push_back(v);
    }
    if (dada.empty())
      x++;
    else
      ans.push_back(dada);
  }
  if (x > 0) {
    printf("-1\n");
    return 0;
  }
  assert((int)ans.size() == k);
  for (auto vec : ans) {
    printf("%d", (int)vec.size());
    for (auto x : vec) printf(" %d", x);
    printf("\n");
  }
  return 0;
}
