#include <bits/stdc++.h>
const int inf = 1500000000;
const int d = 1e9 + 7;
using namespace std;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int t = 1;
  while (t--) {
    int n;
    cin >> n;
    int k;
    cin >> k;
    vector<int> a(n);
    string temp;
    cin >> temp;
    for (int i = 0; i < n; i++) {
      if (temp[i] == 'L') {
        a[i] = 0;
      } else {
        a[i] = 1;
      }
    }
    int m, M;
    m = M = 0;
    vector<vector<int>> ans;
    while (1) {
      int pairs = 0;
      vector<int> l;
      for (int i = 0; i < n - 1; i++) {
        if (a[i] == 1 && a[i + 1] == 0) {
          l.push_back(i + 1);
          a[i] = 0;
          a[i + 1] = 1;
          i++;
          pairs++;
          continue;
        }
      }
      if (pairs > 0) {
        ans.push_back(l);
        M += pairs;
        m++;
      } else {
        break;
      }
    }
    int mn = ans.size();
    if (k < mn || k > M)
      printf("-1\n");
    else {
      k -= ans.size();
      for (auto now : ans) {
        while (now.size() > 1 && k > 0) {
          printf("1 %i\n", now.back());
          now.pop_back();
          k--;
        }
        printf("%i ", now.size());
        for (int i : now) printf("%i ", i);
        printf("\n");
      }
    }
  }
  return 0;
}
