#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout << fixed;
  cout.precision(10);
  int n, k;
  string s;
  cin >> n >> k >> s;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    a[i] = (s[i] == 'R');
  }
  vector<int> cur;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] and !a[i + 1]) {
      cur.push_back(i);
    }
  }
  int total_moves = 0;
  vector<vector<int>> moves;
  while (!cur.empty()) {
    moves.push_back(cur);
    total_moves += cur.size();
    cur.clear();
    for (int x : moves.back()) {
      swap(a[x], a[x + 1]);
      if (x < n - 2 and !a[x + 2]) {
        cur.push_back(x + 1);
      }
      if (x > 0 and a[x - 1]) {
        cur.push_back(x - 1);
      }
    }
  }
  if (k < (int)moves.size() or k > total_moves) {
    cout << -1;
    exit(0);
  }
  reverse(moves.begin(), moves.end());
  while (k) {
    if ((int)moves.back().size() > 1 and (int) moves.size() < k) {
      cout << "1 ";
      cout << moves.back().back() + 1 << "\n";
      moves.back().pop_back();
    } else {
      cout << (int)moves.back().size() << " ";
      for (auto x : moves.back()) {
        cout << x + 1 << " ";
      }
      cout << "\n";
      moves.pop_back();
    }
    k--;
  }
  return 0;
}
