#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
long long arr[N];
vector<vector<int>> g;
int main() {
  ios_base::sync_with_stdio(), cout.tie(NULL), cin.tie(NULL);
  ;
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  int cnt = 0;
  int total = 0;
  while (1) {
    vector<int> temp;
    for (int j = 0; j < n; j++) {
      if (s[j] == 'R' && s[j + 1] == 'L') {
        temp.push_back(j + 1);
        swap(s[j], s[j + 1]);
        j++;
      }
    }
    total += temp.size();
    if (temp.empty())
      break;
    else
      g.push_back(temp), cnt++;
  }
  if (k > total || k < cnt) {
    cout << -1 << endl;
    return 0;
  }
  int i = 0;
  int j = 0;
  int minm = cnt;
  while (minm < k) {
    while (minm < k && j < g[i].size()) {
      cout << 1 << " " << g[i][j] << " \n";
      j++;
      k--;
    }
    if (j == g[i].size()) {
      i++;
      j = 0;
      minm--;
    }
  }
  while (i < cnt) {
    cout << g[i].size() - j << " ";
    for (; j < g[i].size(); j++) {
      cout << g[i][j] << " ";
    }
    cout << "\n";
    i++;
    j = 0;
  }
  return 0;
}
