#include <bits/stdc++.h>
using namespace std;
vector<vector<int>> ans;
vector<int> tem;
int n, k;
string x;
void select() {
  tem.clear();
  for (int i = 0; i + 1 < n; i++) {
    if (x[i] == 'R' && x[i + 1] == 'L') {
      tem.push_back(i);
      i++;
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> k >> x;
  int al = 0;
  while (1) {
    select();
    if ((int)tem.size() == 0) break;
    ans.push_back(tem);
    for (auto i : tem) {
      swap(x[i], x[i + 1]);
    }
    al += (int)tem.size();
  }
  if (k > al || k < (int)ans.size()) {
    cout << "-1\n";
  } else {
    for (int i = 0; i < (int)ans.size(); i++) {
      while ((int)ans[i].size() > 1 && k > (int)ans.size()) {
        k--;
        cout << "1 " << ans[i].back() + 1 << "\n";
        ans[i].pop_back();
      }
      cout << (int)ans[i].size() << " ";
      for (auto j : ans[i]) cout << j + 1 << " ";
      cout << "\n";
    }
  }
}
