#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long MAXN = 2e5 + 5;
const long long INF = 1e18;
const long double PI = acos((long double)-1);
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, k;
  cin >> n >> k;
  vector<vector<long long> > ans;
  string ss;
  cin >> ss;
  long long cnt = 0, mincnt = 0;
  for (int i = (0); i <= (n - 1); i++) {
    ans.push_back(vector<long long>());
    for (int j = (0); j <= (n - 2); j++) {
      if (ss[j] == 'R' && ss[j + 1] == 'L') ans[i].push_back(j), cnt++;
    }
    long long sz = (long long)ans[i].size() - 1;
    if (sz >= 0) mincnt++;
    for (int j = (0); j <= (sz); j++) {
      ss[ans[i][j]] = 'L';
      ss[ans[i][j] + 1] = 'R';
    }
  }
  if (k <= cnt && k >= mincnt) {
    long long extra = k - mincnt;
    vector<long long> newans;
    for (int i = (0); i <= (n - 1); i++) {
      newans.clear();
      long long sz = (long long)ans[i].size() - 1;
      for (int j = (0); j <= (sz); j++) {
        if (extra) {
          if (j != sz) extra--;
          cout << "1 " << ans[i][j] + 1 << '\n';
        } else
          newans.push_back(ans[i][j] + 1);
      }
      if (newans.size()) {
        cout << newans.size();
        long long sz1 = (long long)newans.size() - 1;
        for (int j = (0); j <= (sz1); j++) {
          cout << " " << newans[j];
        }
        cout << '\n';
      }
    }
  } else
    cout << "-1";
}
