#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k;
  scanf(" %lld %lld", &n, &k);
  char s[3001];
  scanf(" %s", s);
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) {
    if (s[i] == 'L')
      a[i] = -1;
    else
      a[i] = 1;
  }
  vector<vector<long long> > ans;
  while (1) {
    vector<bool> used(n, false);
    vector<long long> a1;
    for (long long i = 0; i < n - 1; i++) {
      if (a[i] > a[i + 1] && !used[i] && !used[i + 1]) {
        a1.push_back(i);
        swap(a[i], a[i + 1]);
        used[i] = used[i + 1] = true;
      }
    }
    if (a1.empty())
      break;
    else
      ans.push_back(a1);
  }
  if (k < ans.size()) {
    printf("-1\n");
    return 0;
  }
  long long sum = 0;
  for (long long i = 0; i < ans.size(); i++) {
    sum += ans[i].size();
  }
  if (k > sum) {
    printf("-1\n");
    return 0;
  }
  long long extra = k - (long long)ans.size();
  vector<vector<long long> > fin;
  for (long long i = 0; i < ans.size(); i++) {
    if (extra == 0) {
      fin.push_back(ans[i]);
    } else {
      long long in = 0;
      while (extra > 0 && in < (long long)ans[i].size() - 1) {
        vector<long long> h;
        h.push_back(ans[i][in]);
        in++;
        extra--;
        fin.push_back(h);
      }
      vector<long long> h;
      for (long long j = in; j < ans[i].size(); j++) {
        h.push_back(ans[i][j]);
      }
      fin.push_back(h);
    }
  }
  for (long long i = 0; i < fin.size(); i++) {
    printf("%lld ", (long long)(fin[i]).size());
    for (long long j = 0; j < fin[i].size(); j++) {
      printf("%lld ", fin[i][j] + 1);
    }
    printf("\n");
  }
}
