#include <bits/stdc++.h>
using namespace std;
const long double PI = acos(-1.0L);
const long double EPS = 1e-12L;
mt19937 rng((uint32_t)chrono::steady_clock::now().time_since_epoch().count());
namespace task {
const int N = 3000;
int n, k, s, l, r, c;
char a[N];
vector<vector<int>> v;
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  while (true) {
    v.push_back(vector<int>());
    for (int i = 0; i < n - 1; ++i) {
      if (a[i] == 'R' && a[i + 1] == 'L') {
        v.back().push_back(i);
        swap(a[i], a[i + 1]);
        ++i;
      }
    }
    if (v.back().empty()) {
      v.pop_back();
      break;
    } else {
      ++l;
      r += v.back().size();
    }
  }
  if (l <= k && k <= r) {
    for (int i = 0; i < v.size(); ++i) {
      while (k > l + c && v[i].size() > 1) {
        cout << 1 << ' ' << v[i].back() + 1 << '\n';
        ++c;
        v[i].pop_back();
      }
      cout << v[i].size();
      for (int x : v[i]) cout << ' ' << x + 1;
      cout << '\n';
    }
  } else {
    cout << -1 << '\n';
  }
  return 0;
}
}  // namespace task
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.precision(11);
  cout.setf(ios::fixed);
  return task::main();
}
