#include <bits/stdc++.h>
using namespace std;
deque<vector<int> > v;
int main() {
  int(n), (k);
  scanf("%d %d", &(n), &(k));
  string s;
  cin >> s;
  int mn = 0, mx = 0;
  while (1) {
    mn++;
    v.push_back(vector<int>());
    for (int i = 1; i < n; i++)
      if (s[i] == 'L' && s[i - 1] == 'R') v.back().push_back(i), mx++;
    if (!v.back().size()) {
      mn--;
      break;
    }
    for (int i : v.back()) s[i] = 'R', s[i - 1] = 'L';
  }
  if (!(mn <= k && k <= mx)) {
    cout << "-1\n";
    return 0;
  }
  int rem = k - mn;
  for (vector<int> vec : v) {
    while (rem && vec.size()) {
      cout << "1 " << vec.back() << "\n";
      vec.pop_back();
      rem--;
      if (vec.empty()) rem++;
    }
    if (vec.size()) {
      cout << vec.size() << " ";
      for (int i = 0; i <= vec.size() - 1; i++)
        cout << vec[i] << (i == vec.size() - 1 ? '\n' : ' ');
    }
  }
  return 0;
}
