#include <bits/stdc++.h>
using namespace std;
const long long MAX = 1e6 + 8;
const long long MOD = 1e9 + 7;
const long long sz = 1e5 + 5;
void f_io() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
}
long long n, k, mxm, mnm;
deque<vector<long long>> min_mov;
string s;
void move() {
  while (true) {
    mnm++;
    vector<long long> temp;
    for (long long i = 1; i < n; i++) {
      if (s[i] == 'L' && s[i - 1] == 'R') {
        mxm++;
        temp.push_back(i);
      }
    }
    if (!temp.size()) {
      mnm--;
      break;
    }
    min_mov.push_back(temp);
    for (auto ind : temp) {
      swap(s[ind], s[ind - 1]);
    }
  }
}
int32_t main() {
  f_io();
  long long tc = 1;
  while (tc--) {
    cin >> n >> k >> s;
    move();
    if (k < mnm || k > mxm) return 0 * printf("-1\n");
    long long overhead = k - mnm;
    while (overhead) {
      cout << "1 " << min_mov.front().back() << "\n";
      min_mov.front().pop_back();
      overhead--;
      if (min_mov.front().size() == 0) {
        min_mov.pop_front();
        overhead++;
      }
    }
    while (min_mov.size()) {
      cout << min_mov.front().size() << " ";
      for (auto el : min_mov.front()) cout << el << " ";
      min_mov.pop_front();
      cout << "\n";
    }
  }
}
