#include <bits/stdc++.h>
using namespace std;
char s[1000005];
int a[1000005];
vector<int> v[3000005], vv, tmp;
bool vis[3005];
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  scanf("%s", s + 1);
  for (int i = 1; i <= n; i++)
    if (s[i] == 'L')
      a[i] = 0;
    else
      a[i] = 1;
  a[n + 1] = 1;
  int r = 0;
  int sum = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i] == 1) {
      sum++;
    } else {
      r += sum;
    }
  }
  if (r < k) {
    puts("-1");
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] == 1 && a[i + 1] == 0) {
      vv.push_back(i);
      vis[i] = 1;
    }
  }
  int num = 1, st = 0;
  while (num <= k) {
    int sz = (int)vv.size();
    int pre = st;
    for (int i = pre; i < sz; i++) {
      int x = vv[i];
      if (a[x] == 1 && a[x + 1] == 0) {
        if (r > k - num) {
          v[num].push_back(x);
          r--;
          vis[x] = 0;
        } else {
          break;
        }
      }
      st++;
    }
    for (auto x : v[num]) {
      swap(a[x], a[x + 1]);
    }
    for (auto x : v[num]) {
      if (!vis[x - 1] && a[x - 1] == 1) {
        vv.push_back(x - 1);
        vis[x - 1] = 1;
      }
      if (!vis[x + 1] && a[x + 2] == 0) {
        vv.push_back(x + 1);
        vis[x + 1] = 1;
      }
    }
    num++;
  }
  for (int i = 2; i <= n; i++) {
    if (a[i] == 0 && a[i - 1] == 1) {
      puts("-1");
      return 0;
    }
  }
  for (int i = 1; i <= k; i++) {
    printf("%d ", (int)v[i].size());
    for (auto x : v[i]) printf("%d ", x);
    puts("");
  }
}
