#include <bits/stdc++.h>
using namespace std;
const int N = 3e6 + 7;
const int M = 1e9 + 7;
const long long Mod = 998244353;
int _, i, j, k, n, m, t, T, p, q, l, r, s, len, o, u, v, w, st, en, ma, mi, mid,
    flag, num, res, cnt, now, ans, tmp, nex;
int a[N], c[N];
vector<int> g[N];
string s1, s2;
signed main() {
  ios::sync_with_stdio(false);
  int t = 1;
  while (t--) {
    cin >> n >> k;
    cin >> s1;
    s = 0;
    memset(c, 0, sizeof(c));
    for (i = 0; i < n; i++)
      if (s1[i] == 'R') c[i + 1] = 1;
    l = 1, r = n;
    for (i = 1;; i++) {
      while (l <= n && c[l] == 0) l++;
      while (r >= 1 && c[r] == 1) r--;
      if (l > r) break;
      for (j = l; j < r; j++) {
        if (c[j] == 1 && c[j + 1] == 0)
          c[j] = 0, c[j + 1] = 1, g[i].push_back(j), j++;
      }
      s += g[i].size();
    }
    if (i - 1 > k || s < k)
      cout << -1;
    else {
      w = k - i + 1;
      for (j = 1; j < i; j++) {
        len = g[j].size();
        for (l = 0; l < len; l++) {
          if (!w) break;
          if (l == len - 1) w++;
          w--;
          printf("1 %d\n", g[j][l]);
        }
        if (!w) break;
      }
      printf("%d ", len - l);
      for (; l < len; l++) printf("%d ", g[j][l]);
      printf("\n");
      for (++j; j < i; j++) {
        len = g[j].size();
        printf("%d ", len);
        for (l = 0; l < g[j].size(); l++) printf("%d ", g[j][l]);
        printf("\n");
      }
    }
  }
  return 0;
}
