#include <bits/stdc++.h>
using namespace std;
const int ms = 3000009;
queue<int> q;
string str;
int n, k, total_sum = 0;
vector<vector<int>> g;
int invert_one() {
  auto ind = q.front();
  q.pop();
  str[ind] = 'L';
  str[ind + 1] = 'R';
  if (ind > 0 and str[ind - 1] == 'R') q.push(ind - 1);
  if (ind < n and str[ind + 2] == 'L') q.push(ind + 1);
  return ind;
}
int main() {
  cin >> n >> k >> str;
  int lefts = 0;
  for (int i = n - 1; i >= 0; i--) {
    if (str[i] == 'L')
      lefts++;
    else
      total_sum += lefts;
  }
  for (int i = 0; i < n - 1; i++) {
    if (str[i] == 'R' and str[i + 1] == 'L') {
      q.push(i);
    }
  }
  bool has_solution = 0;
  for (int day = 1; day <= k and !has_solution; day++) {
    vector<int> current_day;
    int sz = min(int(q.size()), n / 2);
    for (int i = 0; i < sz; i++) {
      auto ind = invert_one();
      total_sum--;
      current_day.push_back(ind + 1);
      if (day + total_sum == k) {
        has_solution = 1;
        break;
      }
    }
    g.push_back(current_day);
  }
  if (has_solution) {
    while (total_sum--) {
      auto ind = invert_one();
      vector<int> v = {ind + 1};
      g.push_back(v);
    }
  }
  if (!has_solution) {
    cout << -1 << endl;
  } else {
    for (auto v : g) {
      cout << v.size() << " ";
      for (auto ind : v) {
        cout << ind << " ";
      }
      cout << "\n";
    }
  }
}
