#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int s = 0, w = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    s = (s << 3) + (s << 1) + (ch ^ 48);
    ch = getchar();
  }
  return s * w;
}
const long long mod = 998244353;
const int N = 300100;
int n, m, len, k;
char str[N];
vector<int> G[3010];
int main() {
  n = read();
  k = read();
  scanf("%s", str + 1);
  int cnt = 1;
  int sum = 0;
  while (1) {
    int mark = 0;
    for (int i = 1; i < n; i++) {
      if (str[i] == 'R' && str[i + 1] == 'L') {
        G[cnt].push_back(i);
        swap(str[i], str[i + 1]);
        i++;
        mark = 1;
      }
    }
    if (mark == 0) {
      break;
    }
    sum += G[cnt].size();
    cnt++;
  }
  if (k > sum || k < cnt - 1) {
    printf("-1\n");
    return 0;
  } else {
    cnt--;
    int id = 1;
    int c = 0;
    while (id <= cnt) {
      if (k == cnt) {
        while (id <= cnt) {
          printf("%d", G[id].size());
          for (int j = 0; j < G[id].size(); j++) printf(" %d", G[id][j]);
          printf("\n");
          id++;
        }
        return 0;
      }
      for (int i = 0; i < G[id].size(); i++) {
        printf("1 %d\n", G[id][i]);
        c++;
        if (G[id].size() - 1 != i) {
          if (c + 1 + cnt - id == k) {
            printf("%d", G[id].size() - (i + 1));
            for (int j = i + 1; j < G[id].size(); j++) printf(" %d", G[id][j]);
            printf("\n");
            id++;
            while (id <= cnt) {
              printf("%d", G[id].size());
              for (int j = 0; j < G[id].size(); j++) printf(" %d", G[id][j]);
              printf("\n");
              id++;
            }
            return 0;
          }
        } else if (c + cnt - id == k) {
          id++;
          while (id <= cnt) {
            printf("%d", G[id].size());
            for (int j = 0; j < G[id].size(); j++) printf(" %d", G[id][j]);
            printf("\n");
            id++;
          }
          return 0;
        }
      }
      id++;
    }
  }
}
