#include <bits/stdc++.h>
using namespace std;
function<void(void)> ____ = []() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
};
const int MAXN = 3333;
int n, k;
char s[MAXN], tp[MAXN];
int main() {
  ____();
  cin >> n >> k >> (s + 1);
  strcpy(tp + 1, s + 1);
  vector<int> vec, nvec;
  for (int i = 1; i < n; i++)
    if (tp[i] == 'R' and tp[i + 1] == 'L') vec.emplace_back(i);
  int minn = 0, maxx = 0;
  while (!vec.empty()) {
    minn++;
    for (int pos : vec) {
      maxx++;
      tp[pos] = 'L';
      tp[pos + 1] = 'R';
      if (pos != 1 and tp[pos - 1] == 'R') nvec.emplace_back(pos - 1);
      if (pos + 2 <= n and tp[pos + 2] == 'L') nvec.emplace_back(pos + 1);
    }
    vec.clear();
    vec.swap(nvec);
  }
  if (minn > k or maxx < k) {
    puts("-1");
    return 0;
  }
  for (int i = 1; i < n; i++)
    if (s[i] == 'R' and s[i + 1] == 'L') vec.emplace_back(i);
  int step = k, lft = maxx;
  while (!vec.empty()) {
    if (lft - vec.size() >= step - 1) {
      step--;
      for (int pos : vec) {
        lft--;
        s[pos] = 'L';
        s[pos + 1] = 'R';
        if (pos != 1 and s[pos - 1] == 'R') nvec.emplace_back(pos - 1);
        if (pos + 2 <= n and s[pos + 2] == 'L') nvec.emplace_back(pos + 1);
      }
      printf("%d ", (int)vec.size());
      for (int x : vec) printf("%d ", x);
      puts("");
      vec.clear();
      vec.swap(nvec);
      continue;
    }
    vector<int> vecc;
    int p = 0;
    for (; p < lft - step + 1; p++) {
      int pos = vec[p];
      s[pos] = 'L';
      s[pos + 1] = 'R';
      if (pos != 1 and s[pos - 1] == 'R') nvec.emplace_back(pos - 1);
      if (pos + 2 <= n and s[pos + 2] == 'L') nvec.emplace_back(pos + 1);
      vecc.emplace_back(pos);
    }
    printf("%d ", (int)vecc.size());
    for (int x : vecc) printf("%d ", x);
    puts("");
    for (; p < (int)vec.size(); p++) {
      int pos = vec[p];
      printf("1 %d\n", pos);
      s[pos] = 'L';
      s[pos + 1] = 'R';
      if (pos != 1 and s[pos - 1] == 'R') nvec.emplace_back(pos - 1);
      if (pos + 2 <= n and s[pos + 2] == 'L') nvec.emplace_back(pos + 1);
    }
    vec.clear();
    vec.swap(nvec);
    while (!vec.empty()) {
      for (int pos : vec) {
        printf("1 %d\n", pos);
        s[pos] = 'L';
        s[pos + 1] = 'R';
        if (pos != 1 and s[pos - 1] == 'R') nvec.emplace_back(pos - 1);
        if (pos + 2 <= n and s[pos + 2] == 'L') nvec.emplace_back(pos + 1);
      }
      vec.clear();
      vec.swap(nvec);
    }
  }
  return 0;
}
