#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("-ffloat-store")
using namespace std;
const long long N = (1 << 20) + 5;
void pre() {}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long tt = 1;
  for (long long ttt = 1; ttt <= (tt); ++ttt) {
    long long n, k;
    cin >> n >> k;
    string st;
    cin >> st;
    vector<vector<long long>> v;
    long long tot = 0;
    long long cnt = -1;
    while (true) {
      bool ok = 0;
      for (long long i = 0; i < ((long long)((st).size()) - 1); ++i) {
        if (st[i] == 'R' and st[i + 1] == 'L') {
          if (!ok) {
            ok = 1;
            v.push_back({i});
            ++cnt;
          } else
            v[cnt].push_back(i);
          tot++;
          st[i] = 'L';
          st[i + 1] = 'R';
          i++;
        }
      }
      if (!ok) break;
    }
    if (k < (long long)((v).size()) || k > tot) {
      cout << "-1\n";
      exit(0);
    }
    for (long long i = 0; i < ((long long)((v).size())); ++i) {
      long long j = 0;
      while (j < (long long)((v[i]).size()) and
             (long long)((v).size()) - i < k) {
        k--;
        cout << "1 " << v[i][j] + 1 << '\n';
        j++;
      }
      if (j == (long long)((v[i]).size())) continue;
      cout << (long long)((v[i]).size()) - j << ' ';
      for (long long l = j; l <= ((long long)((v[i]).size()) - 1); ++l)
        cout << v[i][l] + 1 << ' ';
      k--;
      cout << '\n';
    }
  }
}
