#include <bits/stdc++.h>
using namespace std;
void solve(int tc) {
  int n;
  long long k;
  cin >> n >> k;
  string s;
  cin >> s;
  vector<int> a(n, 0), b(n, 0);
  for (int i = 0; i < n; ++i) {
    if (s[i] == 'R') a[i] = 1;
    b[i] = a[i];
  }
  long long total = 0;
  for (int i = 0; i < n; ++i) {
    if (b[i]) continue;
    for (int j = i - 1; j >= 0; --j) {
      if (b[j] == 1) ++total;
      swap(b[j], b[j + 1]);
    }
  }
  if (total < k) {
    cout << -1 << "\n";
    return;
  }
  vector<vector<int>> ans(k);
  int curr = 0;
  bool end = false;
  while (curr < k) {
    for (int i = 0; i < n - 1; ++i) {
      if (a[i] == 1 && a[i + 1] == 0) {
        if (total == k - curr - 1) {
          ++curr;
        }
        ans[curr].push_back(i);
        swap(a[i], a[i + 1]);
        ++i;
        --total;
      }
    }
    if (ans[curr].size() == 0) {
      cout << -1 << "\n";
      return;
    }
    ++curr;
  }
  if (total != 0) {
    cout << -1 << "\n";
    return;
  }
  for (int i = 0; i < k; ++i) {
    cout << ans[i].size() << " ";
    for (int j = 0; j < ans[i].size(); ++j) cout << ans[i][j] + 1 << " ";
    cout << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  for (int tc = 1; tc <= t; ++tc) {
    solve(tc);
  }
  return 0;
}
