#include <bits/stdc++.h>
using namespace std;
const int N = 3333;
vector<int> ans[N * N];
char s[N];
int n, k, T, sum, tot;
void solve() {
  int cnt = 0;
  while (1) {
    cnt++;
    for (int i = 0; i < (int)ans[cnt].size(); i++) {
      if (tot - cnt + 1 == k) {
        printf("%d ", (int)ans[cnt].size() - i);
        for (int j = i; j < (int)ans[cnt].size(); j++)
          printf("%d ", ans[cnt][j]);
        puts("");
        cnt++;
        for (int j = cnt; j <= tot; j++) {
          printf("%d ", (int)ans[j].size());
          for (int k = 0; k < (int)ans[j].size(); k++) printf("%d ", ans[j][k]);
          puts("");
        }
        return;
      } else
        printf("%d %d\n", 1, ans[cnt][i]), k--;
    }
  }
}
int main() {
  scanf("%d%d", &n, &k);
  scanf("%s", s + 1);
  sum = tot = 0;
  while (1) {
    int can = 0;
    tot++;
    for (int i = 1; i < n; i++)
      if (s[i] == 'R' && s[i + 1] == 'L') {
        swap(s[i], s[i + 1]);
        ans[tot].push_back(i);
        sum++, i++;
        can = 1;
      }
    if (can == 0) break;
  }
  tot--;
  if (sum < k || tot > k)
    printf("-1\n");
  else
    solve();
  return 0;
}
