#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, k, cnt = 0, i, j, mini = 0;
  cin >> n >> k;
  string s, t;
  cin >> s;
  vector<long long> g[n];
  for (j = 0; j < n; j++) {
    t = s;
    bool change = false;
    for (i = 1; i < n; i++) {
      if (s[i] == 'L' && s[i - 1] == 'R') {
        g[j].push_back(i);
        t[i] = 'R', t[i - 1] = 'L';
        cnt++;
        change = true;
      }
    }
    s = t;
    if (!change)
      break;
    else
      mini++;
  }
  long long z = k - mini;
  if (k > cnt || k < mini) {
    cout << "-1"
         << "\n";
    return;
  }
  for (i = 0; i < n; i++) {
    if (g[i].size() == 0) break;
    if (z > 0) {
      if (z >= g[i].size()) {
        z -= g[i].size();
        for (auto x : g[i]) cout << "1 " << x << "\n";
        z += 1;
      } else {
        for (j = 0; j < z; j++) cout << "1 " << g[i][j] << "\n";
        cout << g[i].size() - z << " ";
        for (j = z; j < g[i].size(); j++) cout << g[i][j] << " ";
        cout << "\n";
        z = 0;
      }
    } else {
      cout << g[i].size() << " ";
      for (auto x : g[i]) cout << x << " ";
      cout << "\n";
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
