#include <bits/stdc++.h>
using namespace std;
const long long MAX_N = 3000;
long long N, K;
long long val[MAX_N + 10];
char valInit[MAX_N + 10];
vector<vector<long long> > result;
int32_t main() {
  ios::sync_with_stdio(false);
  cin >> N >> K;
  cin >> valInit;
  for (long long i = 0; i < N; i++) {
    if (valInit[i] == 'R') {
      val[i] = 0;
    } else {
      val[i] = 1;
    }
  }
  long long j = -1;
  long long maxi = 0;
  while (1) {
    result.push_back(vector<long long>(0));
    j++;
    bool aChange = false;
    for (long long i = 0; i < N - 1; i++) {
      if (val[i] == 0 && val[i + 1] == 1) {
        aChange = true;
        result[j].push_back(i + 1);
        val[i] = 1;
        val[i + 1] = 0;
        i++;
        maxi++;
      }
    }
    if (!aChange) {
      break;
    }
  }
  result.pop_back();
  long long mini = result.size();
  if (mini > K || maxi < K) {
    cout << -1 << endl;
    return 0;
  }
  long long nb = K - mini;
  long long posTab = 0;
  long long tot = 0;
  for (long long i = 0; i < nb; i++) {
    cout << 1 << " " << result[posTab].back() << '\n';
    result[posTab].pop_back();
    tot++;
    if (result[posTab].empty()) {
      posTab++;
      nb++;
    }
  }
  for (long long i = 0; i < mini; i++) {
    if (result[i].empty()) {
      continue;
    }
    cout << result[i].size() << " ";
    for (long long k = 0; k < result[i].size(); k++) {
      cout << result[i][k] << " ";
    }
    cout << '\n';
  }
}
