#include <bits/stdc++.h>
using namespace std;
int n, k, m = 0, tot = 0;
char s[3007];
int main() {
  scanf("%d%d", &n, &k);
  scanf("%s", s);
  vector<vector<int> > round(k + 7);
  while (1) {
    vector<int> step;
    for (int i = 0; i < n - 1; i++)
      if (s[i] == 'R' && s[i + 1] == 'L') step.push_back(i), tot += 1;
    if (m > k) {
      printf("-1\n");
      return 0;
    }
    if (step.empty()) break;
    round[++m] = step;
    for (int i = step.size() - 1; i >= 0; i--)
      s[step[i]] = 'L', s[step[i] + 1] = 'R';
  }
  if (tot < k) {
    printf("-1\n");
    return 0;
  }
  int index = m;
  for (int i = k + 1 - 1; i >= 1; i--) {
    if (round[index].empty()) index--;
    if (!round[i].empty()) break;
    round[i].push_back(round[index][round[index].size() - 1]);
    round[index].pop_back();
  }
  for (int i = 1; i < k + 1; i++) {
    printf("%d", round[i].size());
    for (int j = round[i].size() - 1; j >= 0; j--) {
      printf(" %d", round[i][j] + 1);
    }
    puts("");
  }
  return 0;
}
