#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
ostream& operator<<(ostream& o, const pair<T, U>& x) {
  o << "(" << x.first << ", " << x.second << ")";
  return o;
}
template <typename T>
ostream& operator<<(ostream& o, const vector<T>& x) {
  o << "[";
  int b = 0;
  for (auto& a : x) o << (b++ ? ", " : "") << a;
  o << "]";
  return o;
}
template <typename T>
ostream& operator<<(ostream& o, const set<T>& x) {
  o << "{";
  int b = 0;
  for (auto& a : x) o << (b++ ? ", " : "") << a;
  o << "}";
  return o;
}
template <typename T>
ostream& operator<<(ostream& o, const multiset<T>& x) {
  o << "{";
  int b = 0;
  for (auto& a : x) o << (b++ ? ", " : "") << a;
  o << "}";
  return o;
}
template <typename T>
ostream& operator<<(ostream& o, const unordered_set<T>& x) {
  o << "{";
  int b = 0;
  for (auto& a : x) o << (b++ ? ", " : "") << a;
  o << "}";
  return o;
}
template <typename T>
ostream& operator<<(ostream& o, const unordered_multiset<T>& x) {
  o << "{";
  int b = 0;
  for (auto& a : x) o << (b++ ? ", " : "") << a;
  o << "}";
  return o;
}
template <typename T, typename U>
ostream& operator<<(ostream& o, const map<T, U>& x) {
  o << "{";
  int b = 0;
  for (auto& a : x) o << (b++ ? ", " : "") << a;
  o << "}";
  return o;
}
template <typename T, typename U>
ostream& operator<<(ostream& o, const multimap<T, U>& x) {
  o << "{";
  int b = 0;
  for (auto& a : x) o << (b++ ? ", " : "") << a;
  o << "}";
  return o;
}
template <typename T, typename U>
ostream& operator<<(ostream& o, const unordered_map<T, U>& x) {
  o << "{";
  int b = 0;
  for (auto& a : x) o << (b++ ? ", " : "") << a;
  o << "}";
  return o;
}
template <typename T, typename U>
ostream& operator<<(ostream& o, const unordered_multimap<T, U>& x) {
  o << "{";
  int b = 0;
  for (auto& a : x) o << (b++ ? ", " : "") << a;
  o << "}";
  return o;
}
double time() { return double(clock()) / CLOCKS_PER_SEC; }
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, k;
  cin >> n >> k;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    char x;
    cin >> x;
    a[i] = (x == 'R');
  }
  vector<int> b = a, x = a;
  sort(begin(b), end(b));
  vector<int> moves;
  while (b != x) {
    for (int i = 0; i + 1 < n; i++) {
      if (x[i] == 1 and x[i + 1] == 0) {
        swap(x[i], x[i + 1]);
        moves.push_back(i);
        i++;
      }
    }
  }
  vector<vector<int>> ans;
  x = a;
  int j = 0;
  while (x != b) {
    ans.push_back({});
    auto& next = ans.back();
    for (int i = 0; i + 1 < n; i++) {
      if (x[i] == 1 and x[i + 1] == 0) {
        swap(x[i], x[i + 1]);
        next.push_back(i);
        i++;
        j++;
        if ((int)(ans).size() + (int)(moves).size() - j == k) {
          for (int k = j; k < (int)(moves).size(); k++)
            ans.push_back({moves[k]});
          goto done;
        }
      }
    }
  }
done:
  if ((int)(ans).size() == k) {
    for (int i = 0; i < k; i++) {
      cout << (int)(ans[i]).size() << ' ';
      for (int j = 0; j < (int)(ans[i]).size(); j++)
        cout << ans[i][j] + 1 << " \n"[j == (int)(ans[i]).size() - 1];
    }
  } else
    cout << -1 << endl;
}
