#include <bits/stdc++.h>
using namespace std;
long long mod = (1000000007LL);
inline long long poww(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = (res * a) % mod;
    a = (a * a) % mod;
    b >>= 1;
  }
  return res;
}
inline pair<int, int> operator+(pair<int, int> A, pair<int, int> B) {
  return pair<int, int>(A.first + B.first, A.second + B.second);
}
inline pair<int, int> operator-(pair<int, int> A, pair<int, int> B) {
  return pair<int, int>(A.first - B.first, A.second - B.second);
}
inline long long mult(long long a, long long b) { return (a * b) % mod; }
long long gcd(long long a, long long b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
int n, m, q, k, v[300050], ans;
pair<int, int> w[300050];
string second;
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> k;
  cin >> second;
  int qmax = 0, q1 = 0;
  ;
  for (int i = 0; i < (int)(second).size(); i++) {
    v[i + 1] = (second[i] == 'R' ? 0 : 1);
    if (v[i + 1] == 1) q1++;
    qmax += (i + 1 - q1);
  }
  if (qmax < k) {
    cout << "-1\n";
    return 0;
  }
  vector<vector<int> > moves;
  while (1) {
    vector<int> pos;
    for (int i = 1; i < n; i++) {
      if (v[i] < v[i + 1]) pos.push_back(i);
    }
    if (pos.empty()) break;
    moves.push_back(pos);
    for (auto i : pos) swap(v[i], v[i + 1]);
  }
  if ((int)(moves).size() > k) {
    cout << "-1\n";
    return 0;
  }
  int sobra = k - (int)(moves).size();
  vector<int> cc;
  while ((int)(moves).size() + (int)(cc).size() < k) {
    if (moves.empty()) {
      cout << "-1\n";
      return 0;
    }
    cc.push_back({moves.back().back()});
    moves.back().pop_back();
    if (moves.back().empty()) moves.pop_back();
  }
  reverse(begin(cc), end(cc));
  for (auto w : cc) moves.push_back({w});
  if ((int)(moves).size() != k) {
    cout << "-1\n";
    return 0;
  }
  for (auto x : moves) {
    cout << (int)(x).size() << " ";
    for (auto w : x) cout << w << " ";
    cout << "\n";
  }
}
