#include <bits/stdc++.h>
void proc() {
  int n, k;
  std::cin >> n >> k;
  std::vector<bool> a(n);
  for (int i = 0; i < n; i++) {
    char c;
    std::cin >> c;
    a[i] = c == 'R';
  }
  int max = 0, tu = 0;
  for (int i = 0; i < n; i++)
    if (a[i])
      tu++;
    else
      max += tu;
  std::clog << max << std::endl;
  std::vector<std::vector<int>> out(k);
  if (max < k) {
    std::cout << -1 << std::endl;
    return;
  }
  k--;
  while (k >= 0 && max > 0) {
    bool ok = true;
    ;
    for (int i = 0; i < n - 1; i++)
      if (a[i] && !a[i + 1]) {
        std::swap(a[i], a[i + 1]);
        out[k].push_back(i);
        i++;
        max--;
        if (max == k) {
          ok = false;
          if (k)
            k--;
          else
            break;
        }
      }
    if (ok) k--;
  }
  if (k > 0 || max > 0) {
    std::cout << -1 << std::endl;
    return;
  }
  for (int i = out.size(); i--;) {
    std::cout << out[i].size();
    for (auto x : out[i]) std::cout << ' ' << x + 1;
    std::cout << '\n';
  }
}
int main() {
  std::cin.tie(0);
  std::cout.tie(0);
  std::cin.sync_with_stdio(false);
  std::cout.sync_with_stdio(false);
  int t = 1;
  while (t--) proc();
  return 0;
}
