#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, k;
  cin >> n >> k;
  vector<char> d(n);
  for (int i = 0; i < int(n); ++i) cin >> d[i];
  vector<int> a;
  int p1 = 0, p2 = n - 1;
  vector<int> coor;
  while (p1 <= p2) {
    int count = 0;
    for (int i = int(p1 + 1); i < int(p2 + 1); ++i) {
      if (d[i - 1] == 'R' && d[i] == 'L') {
        count++;
        coor.emplace_back(i);
        d[i - 1] = 'L';
        d[i] = 'R';
        i++;
      }
    }
    a.emplace_back(count);
    while (d[p1] == 'L') p1++;
    while (d[p2] == 'R') p2--;
  }
  if (coor.size() < k || a.size() > k) {
    cout << -1 << '\n';
    return 0;
  } else {
    int val = coor.size();
    int i1 = 0;
    for (int i = 0; i < int(a.size()); ++i) {
      k--;
      int temp = min(val - i1 - k, a[i]);
      cout << temp << " ";
      for (int j = int(i1); j < int(i1 + temp); ++j) {
        cout << coor[j] << " ";
      }
      cout << '\n';
      if (val - i1 - k <= a[i]) {
        i1 += temp;
        break;
      }
      i1 += temp;
    }
    for (int i = int(i1); i < int(val); ++i) {
      cout << 1 << " " << coor[i] << '\n';
    }
  }
}
