#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fll;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, k;
  cin >> n >> k;
  string second;
  cin >> second;
  int l = 0, r = 0;
  vector<vector<int> > ans;
  while (1) {
    bool mudou = 0;
    vector<int> at;
    for (int i = 1; i < n; i++)
      if (second[i] == 'L' and second[i - 1] == 'R') {
        at.push_back(i);
        swap(second[i - 1], second[i]);
        mudou = 1;
        i++;
      }
    reverse(at.begin(), at.end());
    if (!mudou) break;
    ans.push_back(at);
    l++;
    r += at.size();
  }
  if (k < l or r < k) return cout << -1 << '\n', 0;
  for (auto& i : ans) {
    while (k > l and i.size()) {
      cout << 1 << " " << i.back() << '\n';
      i.pop_back();
      k--;
    }
    l--;
    if (!i.size()) continue;
    cout << i.size() << " ";
    reverse(i.begin(), i.end());
    for (int j : i) cout << j << " ";
    k--;
    cout << '\n';
  }
  exit(0);
}
