#include <bits/stdc++.h>
using namespace std;
using int32 = int_fast32_t;
using int64 = int_fast64_t;
const int32 INF = 1e9;
const int32 MOD = 1e9 + 7;
const int64 LLINF = 1e18;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int32 n, k;
  cin >> n >> k;
  vector<int32> l;
  int64 sum = 0;
  for (int64 i = 0; i < (n); ++i) {
    char c;
    cin >> c;
    if (c == 'L') {
      l.push_back(i);
      sum += i - ((signed)l.size() - 1);
    }
  }
  if (sum < k) {
    cout << (-1) << "\n";
    return 0;
  }
  int32 cur = 0;
  int32 m = l.size();
  vector<vector<int32>> ans;
  int32 idx = 0;
  while (cur < m && l[cur] <= cur) cur++;
  while (cur < m) {
    ans.push_back(vector<int32>());
    for (int64 i = (m - 1); i >= (cur); i--) {
      if (i > 0 && l[i] - l[i - 1] <= 1) continue;
      ans[idx].push_back(l[i]--);
    }
    if (cur < m && l[cur] <= cur) cur++;
    idx++;
  }
  if (k < idx) {
    cout << (-1) << "\n";
    return 0;
  }
  int32 idx2 = 0;
  for (int64 i = (k); i >= (1); i--) {
    if (k == idx - idx2) {
      cout << ans[idx2].size();
      for (int32 x : ans[idx2]) cout << " " << x;
      ++idx2;
    } else {
      cout << 1 << " " << ans[idx2].back();
      ans[idx2].erase(--ans[idx2].end());
      if (ans[idx2].size() == 0) idx2++;
    }
    cout << '\n';
    idx++;
  }
  return 0;
}
