#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int maxn = 1e7 + 100;
int n, k;
char s[maxn], t[maxn];
vector<int> ans[maxn];
void findmi(int lpos, int rpos) {
  int cnt = 0, tot = 0;
  while (1) {
    tot++;
    int flag = 1;
    for (int i = lpos; i <= rpos; i++) {
      if (s[i] == 'R' && s[i + 1] == 'L') {
        swap(s[i], s[i + 1]);
        ans[tot].push_back(i);
        i++;
        cnt++;
        flag = 0;
      }
    }
    tot -= flag;
    while (s[lpos] == 'L') lpos++;
    while (s[rpos] == 'R') rpos--;
    if (lpos > rpos) break;
  }
  if (tot > k || cnt < k) {
    printf("-1\n");
    return;
  } else if (cnt >= k) {
    for (int i = 1; i <= tot; i++) {
      int sz = ans[i].size();
      for (int j = 0; j <= sz - 1; j++) {
        if (tot - i + 1 == k) {
          printf("%d ", sz - j);
          for (int k = j; k <= sz - 1; k++) printf("%d ", ans[i][k]);
          printf("\n");
          for (int j = i + 1; j <= tot; j++) {
            printf("%d ", ans[j].size());
            for (auto to : ans[j]) printf("%d ", to);
            printf("\n");
          }
          exit(0);
        }
        printf("1 %d\n", ans[i][j]);
        k--;
      }
    }
  }
}
int solve() {
  int lpos = 1, rpos = n, lcnt = 0, rcnt = 0;
  while (s[lpos] == 'L') lpos++;
  while (s[rpos] == 'R') rpos--;
  findmi(lpos, rpos);
}
int main() {
  scanf("%d", &n);
  scanf("%d", &k);
  scanf("%s", s + 1);
  for (int i = 1; i <= n; i++) t[i] = s[i];
  solve();
}
