#include <bits/stdc++.h>
using namespace std;
const int maxx = 3e6 + 100;
vector<int> p[maxx];
string s;
int n, k;
int _min = 0, _max = 0;
inline void fcs(int id) {
  for (int i = 0; i < n - 1; i++) {
    if (s[i] == 'R' && s[i + 1] == 'L') {
      p[id].push_back(i);
      swap(s[i], s[i + 1]);
      i++;
    }
  }
}
inline void solve() {
  int uu = _min;
  int i = 0, j = 0;
  while (uu < k) {
    printf("1 %d\n", p[i][j] + 1);
    j++;
    if (j == p[i].size())
      i++, j = 0;
    else
      uu++;
  }
  printf("%d ", p[i].size() - j);
  for (int o = j; o < p[i].size(); o++) printf("%d ", p[i][o] + 1);
  printf("\n");
  i += 1;
  while (i < _min) {
    printf("%d ", p[i].size());
    for (int o = 0; o < p[i].size(); o++) printf("%d ", p[i][o] + 1);
    printf("\n");
    i++;
  }
}
int main() {
  scanf("%d%d", &n, &k);
  cin >> s;
  fcs(0);
  while (p[_min].size() && _min <= k) {
    _max += p[_min].size();
    _min++;
    fcs(_min);
  }
  if (!(_min <= k && k <= _max))
    cout << -1 << endl;
  else
    solve();
  return 0;
}
