#include <bits/stdc++.h>
using namespace std;
vector<int> v[3000001];
char s[3009];
int vis[3000001];
int main() {
  int i, n, m, j, k, kk;
  scanf("%d%d", &n, &k);
  scanf("%s", s + 1);
  int p = 0, maxn = 0;
  bool flag = true;
  while (flag) {
    flag = false;
    for (i = 1; i < n; i++) {
      if (s[i] == 'R' && s[i + 1] == 'L') {
        if (!flag) flag = true, p++;
        v[p].push_back(i);
        s[i] = 'L';
        s[i + 1] = 'R';
        maxn++;
        i++;
      }
    }
    vis[p] = maxn;
  }
  if (k < p || k > maxn) {
    printf("-1\n");
    return 0;
  }
  kk = p;
  int cur = 1;
  int now = 0;
  m = v[1].size();
  while (kk < k) {
    printf("1 %d\n", v[cur][now++]);
    if (now == m) {
      now = 0;
      m = v[++cur].size();
    } else
      kk++;
  }
  m -= now;
  printf("%d", m);
  for (i = now; i < v[cur].size(); i++) printf(" %d", v[cur][i]);
  printf("\n");
  for (i = cur + 1; i <= p; i++) {
    m = v[i].size();
    printf("%d", m);
    for (j = 0; j < m; j++) printf(" %d", v[i][j]);
    printf("\n");
  }
}
