#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  int mn = 0, mx = 0;
  vector<vector<int>> all;
  while (true) {
    vector<int> cur;
    for (int i = 0; i < s.size(); i++) {
      if (i + 1 == s.size()) continue;
      if (s[i] == 'R' && s[i + 1] == 'L') {
        cur.push_back(i + 1);
        swap(s[i], s[i + 1]);
        i++;
      }
    }
    if (cur.size() == 0) break;
    mn++;
    mx += cur.size();
    all.push_back(cur);
  }
  if (k < mn || k > mx)
    cout << -1 << endl;
  else {
    vector<vector<int>> ans;
    while (all.size()) {
      if (all.back().size() == 1 || k == all.size())
        ans.push_back(all.back()), k--, all.pop_back();
      else {
        ans.push_back({all.back().back()}), all.back().pop_back(), k--;
      }
    }
    assert(k == 0);
    reverse(ans.begin(), ans.end());
    for (auto v : ans) {
      cout << v.size() << " ";
      for (int x : v) cout << x << " ";
      cout << "\n";
    }
  }
}
