#include <bits/stdc++.h>
using namespace std;
double pi = acos(-1.0);
const double eps = 1e-12;
const int inf = 0x3f3f3f3f;
const int maxn = 2e6 + 20;
const int maxm = 5e3 + 20;
inline int in(int &ret) {
  char c;
  int sgn;
  if (c = getchar(), c == EOF) return -1;
  while (c != '-' && (c < '0' || c > '9')) c = getchar();
  sgn = (c == '-') ? -1 : 1;
  ret = (c == '-') ? 0 : (c - '0');
  while (c = getchar(), c >= '0' && c <= '9') ret = ret * 10 + (c - '0');
  ret *= sgn;
  return 1;
}
char s[maxn];
char s2[maxn];
vector<int> v[maxn];
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  scanf("%s", s + 1);
  int cr = 0;
  int mx = 0;
  for (int i = n; i >= 1; --i) {
    if (s[i] == 'R') {
      ++cr;
      mx += n - cr + 1 - i;
    }
    s2[i] = s[i];
  }
  int mn = 0;
  while (1) {
    bool ok = 0;
    for (int i = 1; i <= n; ++i) {
      if (s2[i] == 'R' && s2[i + 1] == 'L') {
        swap(s2[i], s2[i + 1]);
        v[mn + 1].push_back(i);
        ++i;
        ok = 1;
      }
    }
    mn += ok;
    if (!ok) break;
  }
  if (k < mn || k > mx) return 0 * puts("-1");
  int nd = k - mn;
  for (int i = 1; i <= mn; ++i) {
    int sz = v[i].size();
    if (sz > 1 && nd > 0) {
      int can = sz - 1;
      int sol = min(can, nd);
      for (int j = 0; j < (sol); ++j) printf("1 %d\n", v[i][j]);
      nd -= sol;
      printf("%d", sz - sol);
      for (int j = sol; j < sz; ++j) printf(" %d", v[i][j]);
      putchar('\n');
    } else {
      printf("%d", sz);
      for (int j = 0; j < (sz); ++j) printf(" %d", v[i][j]);
      putchar('\n');
    }
  }
  return 0;
}
