#include <bits/stdc++.h>
using namespace std;
const int maxn = 3005, maxk = 3e6 + 10;
char str[maxn];
vector<int> ans[maxk];
int main() {
  int n, k, turn = 0, sum = 0;
  scanf("%d%d%s", &n, &k, str + 1);
  bool update = true;
  while (update) {
    turn++;
    update = false;
    for (int i = 1; i < n; i++) {
      if (str[i] == 'R' && str[i + 1] == 'L') {
        update = true;
        ans[turn].push_back(i);
        swap(str[i], str[i + 1]);
        i++, sum++;
      }
    }
  }
  turn--;
  if (k < turn || k > sum)
    puts("-1");
  else {
    int x = k - turn;
    for (int i = 1; i <= turn; i++, x++) {
      while (x && !ans[i].empty()) {
        printf("1 %d\n", ans[i].back());
        ans[i].pop_back(), x--;
      }
      if (!ans[i].empty()) {
        printf("%d", ans[i].size());
        for (auto v : ans[i]) printf(" %d", v);
        puts("");
        x--;
      }
    }
  }
  return 0;
}
