#include <bits/stdc++.h>
using namespace std;
double pi = acos(-1);
long long power(long long a, long long b) {
  long long p_res = 1;
  while (b > 0) {
    if (b % 2 == 1) {
      p_res *= a;
      b--;
    }
    a *= a;
    b /= 2;
  }
  return p_res;
}
long long gcd(long long a, long long b) {
  long long tmp;
  while (b != 0) {
    tmp = a;
    a = b;
    b = tmp % b;
  }
  return a;
}
char str[3010];
void solve() {
  int n, k;
  scanf("%d %d", &n, &k);
  int tot = 0;
  scanf("%s", str);
  vector<vector<int> > vec(k, vector<int>());
  int idx = 0;
  while (1) {
    vector<int> step;
    for (int i = 0; i < n - 1; i++) {
      if (str[i] == 'R' && str[i + 1] == 'L') {
        step.push_back(i + 1);
        swap(str[i], str[i + 1]);
        i++;
      }
    }
    tot += step.size();
    if (step.empty()) break;
    if (idx >= k) {
      cout << -1;
      return;
    }
    vec[idx++] = step;
  }
  if (k > tot || k < idx) {
    cout << -1;
    return;
  }
  idx--;
  for (int i = k - 1; i >= 0; i--) {
    if (vec[idx].empty()) idx--;
    if (!vec[i].empty()) break;
    vec[i].push_back(vec[idx].back());
    vec[idx].pop_back();
  }
  for (int i = 0; i < k; i++) {
    printf("%d ", vec[i].size());
    for (auto v : vec[i]) {
      printf("%d ", v);
    }
    puts("");
  }
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
