#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
constexpr ll MOD = 1000 * 1000 * 1000 + 7;
constexpr int ALPHABET_SIZE = 26;
constexpr ll INF = 1e18;
int main() {
  ios_base::sync_with_stdio(false);
  size_t n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  size_t left = 0;
  size_t inv = 0;
  for (int i = static_cast<int>(n) - 1; i >= 0; --i) {
    if (s[i] == 'R') {
      inv += left;
    } else {
      ++left;
    }
  }
  if (inv < k) {
    cout << -1 << "\n";
    return 0;
  }
  unordered_set<size_t> inv_pos;
  for (size_t j = 0; j + 1 < n; ++j) {
    if (s[j] == 'R' && s[j + 1] == 'L') {
      inv_pos.insert(j);
    }
  }
  vector<size_t> pos;
  vector<vector<size_t>> ans;
  for (size_t i = 0; i < k; ++i) {
    pos.clear();
    for (auto it = inv_pos.begin();
         it != inv_pos.end() && inv - pos.size() > k - i - 1; ++it) {
      pos.push_back(*it);
    }
    if (pos.empty()) {
      cout << -1 << "\n";
      return 0;
    }
    inv -= pos.size();
    for (size_t p : pos) {
      s[p] = 'L';
      s[p + 1] = 'R';
      inv_pos.erase(p);
      if (p > 0 && s[p - 1] == 'R') {
        inv_pos.insert(p - 1);
      }
      if (p + 2 < n && s[p + 2] == 'L') {
        inv_pos.insert(p + 1);
      }
    }
    ans.emplace_back(move(pos));
  }
  if (inv > 0) {
    cout << -1 << "\n";
    return 0;
  }
  for (size_t i = 0; i < k; ++i) {
    cout << ans[i].size() << " ";
    for (size_t p : ans[i]) {
      cout << p + 1 << " ";
    }
    cout << "\n";
  }
  return 0;
}
