#include <bits/stdc++.h>
using namespace std;
const int maxn = 3000 + 10;
template <typename T>
inline T read() {
  T ans = 0, flag = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') flag = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    ans = ans * 10 + c - 48;
    c = getchar();
  }
  return ans * flag;
}
int n, k;
char s[maxn];
vector<int> v[maxn];
int main() {
  n = read<int>();
  k = read<int>();
  scanf("%s", s + 1);
  int Min(0), Max(0);
  bool flag = 1;
  int cnt = 0;
  while (flag) {
    flag = 0;
    cnt++;
    for (register int i(2), end_i(n); i <= end_i; i++)
      if (s[i - 1] == 'R' && s[i] == 'L') {
        swap(s[i - 1], s[i]);
        v[cnt].emplace_back(i - 1);
        i++;
        Max++;
        flag = 1;
      }
    if (!flag) break;
    Min++;
  }
  if (!(Min <= k && k <= Max))
    puts("-1");
  else {
    int less = k - Min, tot = 0;
    for (register int i(1), end_i(Min); i <= end_i; i++) {
      while (v[i].size() > 1 && less) {
        less--;
        printf("1 %d\n", v[i].back());
        v[i].pop_back();
      }
      printf("%d", (int)v[i].size());
      for (auto j : v[i]) printf(" %d", j);
      puts("");
    }
  }
  return 0;
}
