#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  map<long long, vector<long long>> m;
  long long sz = 0;
  long long cnt = 0;
  while (true) {
    bool flag = false;
    for (long long i = 0; i < n; i++) {
      if (i + 1 < n && s[i] == 'R' && s[i + 1] == 'L') {
        flag = true;
        m[sz].push_back(i + 1);
        s[i] = 'L';
        s[i + 1] = 'R';
        i++;
        cnt++;
      }
    }
    if (!flag) break;
    sz++;
  }
  if (sz > k || cnt < k) {
    cout << -1 << "\n";
    return;
  }
  if (cnt == k) {
    for (long long i = 0; i < sz; i++) {
      for (auto j : m[i]) {
        cout << 1 << " " << j << "\n";
      }
    }
    return;
  }
  if (sz == k) {
    for (long long i = 0; i < sz; i++) {
      cout << m[i].size() << " ";
      for (auto j : m[i]) {
        cout << j << " ";
      }
      cout << "\n";
    }
    return;
  }
  long long x = 0;
  long long rem = sz - x - 1;
  while (true) {
    if (rem + m[x].size() <= k) {
      for (auto i : m[x]) {
        cout << 1 << " " << i << "\n";
        k--;
      }
      if (k == rem) {
        x++;
        break;
      }
      x++;
      rem = sz - x - 1;
    } else {
      long long val = m[x].size();
      long long fnl = k - rem;
      if (fnl == 0) return;
      bool flag = true;
      for (long long i = 0; i < fnl; i++) {
        for (auto j : m[x]) {
          if (i != fnl - 1) {
            cout << 1 << " " << j << "\n";
            i++;
            k--;
          } else {
            if (flag) {
              cout << val - (fnl - 1) << " ";
              flag = false;
              k--;
            }
            cout << j << " ";
          }
        }
        cout << "\n";
      }
      x++;
      break;
    }
  }
  for (long long i = 0; i < k; i++) {
    cout << m[x].size() << " ";
    for (auto j : m[x]) {
      cout << j << " ";
    }
    x++;
    cout << "\n";
  }
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  return 0;
}
