#include <bits/stdc++.h>
using namespace std;
const int N = 3005;
char s[N], ts[N];
int main() {
  int n, k, i, j, c2 = 0;
  scanf("%d%d%s", &n, &k, s + 1);
  for (i = 1; i <= n; i++) ts[i] = s[i];
  for (i = 1; i < n; i++) {
    int ok = 0, last = 0;
    for (j = 1; j < n; j++) {
      if (!last && s[j] == 'R' && s[j + 1] == 'L')
        ok = 1, c2++, last = 1, swap(s[j], s[j + 1]);
      else
        last = 0;
    }
    if (!ok) break;
  }
  int c1 = i - 1;
  for (i = 1; i <= n; i++) s[i] = ts[i];
  if (c2 < k || c1 > k) {
    printf("-1");
    return 0;
  }
  int rem = k, st = 0;
  for (i = 1; i <= c1; i++) {
    int last = 0;
    if (rem == c1 - i + 1) st = 1;
    if (st) {
      int cnt = 0;
      for (j = 1; j < n; j++)
        if (s[j] == 'R' && s[j + 1] == 'L') cnt++;
      printf("%d ", cnt);
      for (j = 1; j < n; j++) {
        if (!last && s[j] == 'R' && s[j + 1] == 'L') {
          last = 1, swap(s[j], s[j + 1]);
          printf("%d ", j);
        } else
          last = 0;
      }
      rem--;
      printf("\n");
      continue;
    }
    for (j = 1; j < n; j++) {
      if (rem == c1 - i + 1) break;
      if (!last && s[j] == 'R' && s[j + 1] == 'L') {
        last = 1, swap(s[j], s[j + 1]);
        rem--, printf("1 %d\n", j);
      } else
        last = 0;
    }
    if (rem == c1 - i + 1) {
      int tj = j, tlas = last, cnt = 0;
      for (; j < n; j++) {
        if (!last && s[j] == 'R' && s[j + 1] == 'L')
          cnt++;
        else
          last = 0;
      }
      if (cnt == 0) continue;
      printf("%d ", cnt);
      for (j = tj, last = tlas; j < n; j++) {
        if (!last && s[j] == 'R' && s[j + 1] == 'L') {
          last = 1, swap(s[j], s[j + 1]);
          printf("%d ", j);
        } else
          last = 0;
      }
      rem--;
      printf("\n");
    }
  }
  return 0;
}
