#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  int n, k;
  cin >> n >> k;
  int mi = 0;
  string st;
  cin >> st;
  string second = st;
  vector<vector<int> > v;
  for (int i = 0; i < n; i++) {
    int flag = 0;
    vector<int> vv;
    for (int j = 0; j < n - 1; j++) {
      if (second[j] == 'R' && second[j + 1] == 'L') {
        swap(second[j], second[j + 1]);
        flag = 1;
        vv.push_back(j + 1);
        j++;
      }
    }
    if (flag == 0) break;
    v.push_back(vv);
    mi += flag;
  }
  if (k < mi) {
    cout << -1;
    return 0;
  }
  int et = k - mi;
  second = st;
  vector<vector<int> > ans;
  for (int i = 0; i < v.size(); i++) {
    int add = min(et, (int)v[i].size() - 1);
    et -= add;
    for (int j = 0; j < add; j++) {
      ans.push_back({v[i][j]});
    }
    ans.push_back(vector<int>(v[i].begin() + add, v[i].end()));
  }
  if (ans.size() == k) {
    for (int i = 0; i < k; i++) {
      cout << ans[i].size() << ' ';
      for (int j = 0; j < ans[i].size(); j++) {
        cout << ans[i][j] << ' ';
      }
      cout << '\n';
    }
  } else {
    cout << -1;
  }
  return 0;
}
