#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long expo_pow(long long x, long long y) {
  y = y % (mod - 1);
  if (y == 0) y = mod - 1;
  long long res = 1;
  while (y) {
    if (y & 1) res = (res * x) % mod;
    x = (x * x) % mod;
    y >>= 1;
  }
  return res;
}
long long a[4000];
long long n, k;
vector<long long> find_steps() {
  vector<long long> steps;
  for (long long i = 0; i < n - 1; i++) {
    if (a[i] == 1 and a[i + 1] == -1) {
      steps.push_back(i);
    }
  }
  return steps;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  string second;
  cin >> second;
  for (long long i = 0; i < n; i++) {
    if (second[i] == 'R')
      a[i] = 1;
    else
      a[i] = -1;
  }
  long long mn = 0;
  long long mx = 0;
  long long cnt = 0;
  long long last = -1;
  for (long long i = n - 1; i >= 0; i--) {
    if (a[i] == -1)
      cnt++;
    else {
      if (cnt == 0) continue;
      mx += cnt;
      mn = max(cnt, last + 1);
      last = mn;
    }
  }
  if (k < mn or k > mx) {
    cout << "-1\n";
    return 0;
  }
  bool is_mn = false;
  vector<long long> rem;
  for (long long i = 0; i < k; i++) {
    if (!is_mn) {
      vector<long long> steps = find_steps();
      cout << min((long long)(steps.size()), mx - k + i + 1) << " ";
      long long cur = 0;
      while (k - i - 1 < mx and cur < steps.size()) {
        cout << steps[cur] + 1 << " ";
        a[steps[cur]] = -1;
        a[steps[cur] + 1] = 1;
        ++cur;
        mx--;
      }
      cout << "\n";
      if (mx == k - i - 1) {
        is_mn = true;
        rem = find_steps();
      }
    } else {
      long long v = rem.back();
      rem.pop_back();
      cout << "1 " << v + 1 << "\n";
      a[v] = -1;
      a[v + 1] = 1;
      if (v > 0 and a[v - 1] == 1) {
        rem.push_back(v - 1);
      }
      if (v + 2 < n and a[v + 2] == -1) {
        rem.push_back(v + 1);
      }
    }
  }
}
