#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 1e6 + 1, mod = 1e9 + 7, inf = 2e9;
int n, k, id = 0, cnt = 0;
bool d[N];
vector<int> ans[N];
void solve() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    char c;
    cin >> c;
    d[i] = c == 'R';
  }
  while (true) {
    bool br = 1;
    for (int i = 1; i < n; i++) {
      if (d[i] && !d[i + 1]) {
        br = 0;
      }
    }
    if (br || cnt > n * n) {
      break;
    }
    id++;
    for (int i = 1; i < n; i++) {
      if (d[i] && !d[i + 1]) {
        ans[id].push_back(i);
        d[i] ^= 1;
        d[++i] ^= 1;
        cnt++;
      }
    }
  }
  if (cnt < k || cnt > n * n || id > k) {
    cout << -1;
    return;
  }
  k -= id;
  for (int i = 1; i <= id; i++) {
    while (k && (int)ans[i].size() > 1) {
      k--;
      cout << "1 " << ans[i].back() << '\n';
      ans[i].pop_back();
    }
    cout << (int)ans[i].size() << ' ';
    for (auto x : ans[i]) {
      cout << x << ' ';
    }
    cout << '\n';
  }
}
int main() {
  cin.tie(0)->sync_with_stdio(0);
  int t = 1;
  while (t--) {
    solve();
  }
}
