#include <bits/stdc++.h>
using namespace std;
template <class T>
ostream& operator<<(ostream& cout, vector<T> V) {
  cout << "[ ";
  for (auto v : V) cout << v << ' ';
  return cout << ']';
}
template <class L, class R>
ostream& operator<<(ostream& cout, pair<L, R> P) {
  return cout << '(' << P.first << ',' << P.second << ')';
}
bool poss(string& s) {
  for (long long int i = 0; i < (s.size() - 1); i++) {
    if (s[i] == 'R' && s[i + 1] == 'L') return 1;
  }
  return 0;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n;
  cin >> n;
  long long int k;
  cin >> k;
  string s;
  cin >> s;
  vector<vector<long long int>> ans;
  while (poss(s)) {
    cerr << s << endl;
    ans.push_back({});
    string temp = s;
    for (long long int i = 0; i < (n - 1); i++) {
      if (s[i] == 'R' && s[i + 1] == 'L') {
        temp[i] = 'L';
        temp[i + 1] = 'R';
        ans.back().push_back(i);
      }
    }
    s = temp;
  }
  long long int tot = 0;
  for (auto i : ans) tot += i.size();
  if (k > tot) {
    cout << -1 << '\n';
  } else {
    long long int curr = ans.size();
    vector<vector<long long int>> fans;
    for (auto i : ans) {
      fans.push_back({});
      for (long long int j : i) {
        if (fans.back().size() && curr != k) {
          fans.push_back({});
          curr++;
        }
        fans.back().push_back(j);
      }
    }
    if (fans.size() != k) {
      cout << -1 << '\n';
    } else {
      for (auto i : fans) {
        cout << i.size() << ' ';
        for (long long int j : i) cout << j + 1 << ' ';
        cout << '\n';
      }
    }
  }
  cerr << "Time : " << 1000 * (long double)clock() / (long double)CLOCKS_PER_SEC
       << "ms\n";
  ;
}
