#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int negative_infinite = 0xcfcfcfcf;
const double pi = acos(-1);
const int mod = 1e9 + 7;
const double eps = 1e-8;
const int MAXN = 3e3 + 117;
const int MAXM = 2e5 + 117;
int n, k;
char s[MAXN];
int cnt, sum, a[MAXN];
vector<int> ans[MAXN];
void solve() {
  cnt = sum = 0;
  while (true) {
    bool f = true;
    for (int i = 1; i < n; i++) {
      if (a[i] > a[i + 1]) {
        swap(a[i], a[i + 1]);
        ans[cnt].push_back(i);
        f = false;
        sum++;
        i++;
      }
    }
    if (f) break;
    cnt++;
  }
}
void out() {
  int x = 0, y = 0, z = ans[0].size();
  while (k--) {
    int dy = min(z - y, sum - k);
    printf("%d", dy);
    sum -= dy;
    while (dy--) printf(" %d", ans[x][y++]);
    if (y == z) {
      x++;
      y = 0;
      z = ans[x].size();
    }
    putchar(10);
  }
}
int main() {
  scanf("%d%d", &n, &k);
  scanf("%s", s + 1);
  for (int i = 1; i <= n; i++) {
    if (s[i] == 'R')
      a[i] = 1;
    else
      a[i] = 0;
  }
  solve();
  if (cnt <= k && k <= sum)
    out();
  else
    puts("-1");
  return 0;
}
