#include <bits/stdc++.h>
using namespace std;
ifstream fin("AAtest.in.txt");
int n, k;
string s;
vector<vector<int>> v;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cerr.tie(0);
  cin >> n >> k >> s;
  int su = 0;
  bool oli = 1;
  int vi = 0;
  while (oli) {
    vector<int> p;
    p.resize(0);
    v.emplace_back(p);
    oli = 0;
    int i = n - 1;
    while (i > 0) {
      if (s[i] == 'L' and s[i - 1] == 'R') {
        oli = 1;
        s[i] = 'R', s[i - 1] = 'L';
        v[vi].emplace_back(i);
        i--;
        su++;
      }
      i--;
    }
    if (oli) vi++;
  }
  if (k < vi or k > su)
    cout << -1;
  else {
    int d = v.size();
    for (int(i) = (0); ((i)) < ((v.size())); ((i))++) {
      int jj = v[i].size();
      for (int(j) = (0); ((j)) < ((v[i].size())); ((j))++) {
        if (k >= d) {
          cout << 1 << " " << v[i][j] << "\n";
          k--;
          jj--;
        } else {
          if (jj) {
            cout << jj << " ";
            jj = 0;
            k = 0;
          }
          cout << v[i][j] << " ";
        }
      }
      d--;
      if (!k) cout << "\n";
    }
  }
}
