#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  string ss = s;
  int iter = 0;
  int total = 0;
  while (true) {
    int cnt = 0;
    for (int i = 1; i < n; i++)
      if (s[i - 1] == 'R' && s[i] == 'L') {
        s[i - 1] = 'L';
        s[i] = 'R';
        cnt++;
        i++;
      }
    if (cnt == 0) break;
    iter++;
    total += cnt;
  }
  if (k < iter || k > total) {
    cout << -1 << endl;
    return 0;
  }
  s = ss;
  int slow = k - iter;
  while (true) {
    int cnt = 0;
    vector<int> res;
    for (int i = 1; i < n; i++)
      if (s[i - 1] == 'R' && s[i] == 'L') {
        s[i - 1] = 'L';
        s[i] = 'R';
        cnt++;
        if (slow > 0) {
          slow--;
          cout << "1 " << i << "\n";
        } else {
          res.push_back(i);
        }
        i++;
      }
    if (cnt == 0) break;
    if (res.size() > 0) {
      cout << res.size();
      for (int i = 0; i < res.size(); i++) cout << " " << res[i];
      cout << "\n";
    } else {
      slow++;
    }
  }
  cout.flush();
  return 0;
}
