#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int i, j, k, l, n, test_case, m, r;
  test_case = 1;
  while (test_case--) {
    cin >> n >> k;
    string str;
    cin >> str;
    int rc = 0, lc = 0, kk = k;
    vector<pair<int, int> > vec;
    int ans = 0;
    for (i = 0; i < n; i++) {
      if (str[i] == 'L') {
        if (rc) vec.push_back({i, rc});
        ans += rc;
      } else {
        rc++;
      }
    }
    reverse((vec).begin(), (vec).end());
    vector<pair<int, int> > to_print[k];
    while (k) {
      if (ans < k) break;
      if (ans > k) {
        i = vec.size() - 1;
        while (ans >= k && i >= 0) {
          if (i == vec.size() - 1) {
            to_print[k - 1].push_back({vec[i].first, i});
            ans--;
          } else if (vec[i].first > vec[i + 1].first + 1) {
            to_print[k - 1].push_back({vec[i].first, i});
            ans--;
          }
          i--;
        }
      } else if (ans == k) {
        to_print[k - 1].push_back({vec.back().first, vec.size() - 1});
        ans--;
      }
      for (auto it : to_print[k - 1]) {
        vec[it.second].first--;
        vec[it.second].second--;
      }
      if (vec.back().second == 0) vec.pop_back();
      k--;
    }
    if (k == 0 && ans == 0) {
      for (i = kk - 1; i >= 0; i--) {
        cout << to_print[i].size();
        for (auto it : to_print[i]) cout << " " << it.first;
        cout << "\n";
      }
    } else
      cout << "-1\n";
  }
  return 0;
}
