#include<bits/stdc++.h>
using namespace std;
#define task "codeforces"
#define rep(i,a,b) for(int i=(a),_b=(b);i<=_b;++i)
#define per(i,b,a) for(int i=(b),_a=(a);i>=_a;--i)
#define BIT(x, i) (((x) >> (i)) & 1)
#define lb lower_bound
#define ub upper_bound
#define lla(v) (v).begin(),(v).end()
#define zs(v) int((v).size())
#define fi first
#define se second
#define pb push_back
#define mp make_pair
typedef long double ld;
typedef long long ll;
typedef pair<int,int> pii;
const int mod=1000000007; /// 998244353
const int base=311;
const int N=1e5+5;

int n,k;
string s;

void solved()
{
    cin>>n>>k;
    cin>>s;
    vector<pii> v;
    int dem=0;
    while(1)
    {
        int ok=1;
        for(int i=0;i<zs(s)-1;++i)
            ok&=(!(s[i]=='R'&&s[i+1]=='L'));
        if(ok) break;
        ++dem;
        vector<int> tam; tam.clear();
        for(int i=0;i<zs(s)-1;++i)
        if(s[i]=='R'&&s[i+1]=='L')
        {
            v.pb({i+1,dem});
            s[i]='L'; s[i+1]='R';
            ++i;
        }
    }
    if(dem>k) {cout<<-1; return;}
    if(zs(v)<k) {cout<<-1; return;}
    int cut=k-dem;
    for(int i=0;i<zs(v);++i)
    {
        if(cut)
        {
            --cut;
            cout<<1<<' '<<v[i].fi<<'\n';
            continue;
        }
        else
        {
            int j=i;
            while(j<zs(v)-1&&v[j+1].se==v[i].se) ++j;
            cout<<j-i+1<<' ';
            for(int k=i;k<=j;++k)
            {
                assert(v[k].fi>0);
                cout<<v[k].fi<<' ';
            }
            cout<<'\n';
            i=j;
        }
    }
}
int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);
    if(fopen(task".inp","r"))
    {
        freopen(task".inp","r",stdin);
        freopen(task".out","w",stdout);
    }
    solved();
}


#include<bits/stdc++.h>
using namespace std;
#define task "codeforces"
#define rep(i,a,b) for(int i=(a),_b=(b);i<=_b;++i)
#define per(i,b,a) for(int i=(b),_a=(a);i>=_a;--i)
#define BIT(x, i) (((x) >> (i)) & 1)
#define lb lower_bound
#define ub upper_bound
#define lla(v) (v).begin(),(v).end()
#define zs(v) int((v).size())
#define fi first
#define se second
#define pb push_back
#define mp make_pair
typedef long double ld;
typedef long long ll;
typedef pair<int,int> pii;
const int mod=1000000007; /// 998244353
const int base=311;
const int N=1e5+5;

int n,k;
string s;

void solved()
{
    cin>>n>>k;
    cin>>s;
    vector<pii> v;
    int dem=0;
    while(1)
    {
        int ok=1;
        for(int i=0;i<zs(s)-1;++i)
            ok&=(!(s[i]=='R'&&s[i+1]=='L'));
        if(ok) break;
        ++dem;
        vector<int> tam; tam.clear();
        for(int i=0;i<zs(s)-1;++i)
        if(s[i]=='R'&&s[i+1]=='L')
        {
            v.pb({i+1,dem});
            s[i]='L'; s[i+1]='R';
            ++i;
        }
    }
    if(dem>k) {cout<<-1; return;}
    if(zs(v)<k) {cout<<-1; return;}
    int cut=k-dem;
    for(int i=0;i<zs(v);++i)
    {
        if(cut)
        {
            --cut;
            cout<<1<<' '<<v[i].fi<<'\n';
            continue;
        }
        else
        {
            int j=i;
            while(j<n&&v[j+1].se==v[i].se) ++j;
            cout<<j-i+1<<' ';
            for(int k=i;k<=j;++k) cout<<v[k].fi<<' ';
            cout<<'\n';
            i=j;
        }
    }
}
int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);
    if(fopen(task".inp","r"))
    {
        freopen(task".inp","r",stdin);
        freopen(task".out","w",stdout);
    }
    solved();
}


#include<bits/stdc++.h>
using namespace std;
#define task "codeforces"
#define rep(i,a,b) for(int i=(a),_b=(b);i<=_b;++i)
#define per(i,b,a) for(int i=(b),_a=(a);i>=_a;--i)
#define BIT(x, i) (((x) >> (i)) & 1)
#define lb lower_bound
#define ub upper_bound
#define lla(v) (v).begin(),(v).end()
#define zs(v) int((v).size())
#define fi first
#define se second
#define pb push_back
#define mp make_pair
typedef long double ld;
typedef long long ll;
typedef pair<int,int> pii;
const int mod=1000000007; /// 998244353
const int base=311;
const int N=1e5+5;

int n,k;
string s;

void solved()
{
    cin>>n>>k;
    cin>>s;
    vector<pii> v;
    int dem=0;
    while(1)
    {
        int ok=1;
        for(int i=0;i<zs(s)-1;++i)
            ok&=(!(s[i]=='R'&&s[i+1]=='L'));
        if(ok) break;
        ++dem;
        vector<int> tam; tam.clear();
        for(int i=0;i<zs(s)-1;++i)
        if(s[i]=='R'&&s[i+1]=='L')
        {
            v.pb({i+1,dem});
            s[i]='L'; s[i+1]='R';
            ++i;
        }
    }
    if(dem>k) {cout<<-1; return;}
    if(zs(v)<k) {cout<<-1; return;}
    int cut=k-dem;
    for(int i=0;i<zs(v);++i)
    {
        if(cut)
        {
            --cut;
            cout<<1<<' '<<v[i].fi<<'\n';
            continue;
        }
        else
        {
            int j=i;
            while(j<zs(v)-1&&v[j+1].se==v[i].se) ++j;
            cout<<j-i+1<<' ';
            for(int k=i;k<=j;++k) cout<<v[k].fi<<' ';
            cout<<'\n';
            i=j;
        }
    }
}
int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);
    if(fopen(task".inp","r"))
    {
        freopen(task".inp","r",stdin);
        freopen(task".out","w",stdout);
    }
    solved();
}


#include<bits/stdc++.h>
using namespace std;
#define task "codeforces"
#define rep(i,a,b) for(int i=(a),_b=(b);i<=_b;++i)
#define per(i,b,a) for(int i=(b),_a=(a);i>=_a;--i)
#define BIT(x, i) (((x) >> (i)) & 1)
#define lb lower_bound
#define ub upper_bound
#define lla(v) (v).begin(),(v).end()
#define zs(v) int((v).size())
#define fi first
#define se second
#define pb push_back
#define mp make_pair
typedef long double ld;
typedef long long ll;
typedef pair<int,int> pii;
const int mod=1000000007; /// 998244353
const int base=311;
const int N=1e5+5;

int n,k;
string s;

void solved()
{
    cin>>n>>k;
    cin>>s;
    vector<pii> v;
    int dem=0;
    while(1)
    {
        int ok=1;
        for(int i=0;i<zs(s)-1;++i)
            ok&=(!(s[i]=='R'&&s[i+1]=='L'));
        if(ok) break;
        ++dem;
        vector<int> tam; tam.clear();
        for(int i=0;i<zs(s)-1;++i)
        if(s[i]=='R'&&s[i+1]=='L')
        {
            v.pb({i+1,dem});
            s[i]='L'; s[i+1]='R';
            ++i;
        }
    }
    if(dem>k) {cout<<-1; return;}
    if(zs(v)<k) {cout<<-1; return;}
    int cut=k-dem;
    for(int i=0;i<zs(v);++i)
    {
        if(cut)
        {
            assert(v[i].fi>0);
            --cut;
            cout<<1<<' '<<v[i].fi<<'\n';
            continue;
        }
        else
        {
            int j=i;
            while(j<zs(v)-1&&v[j+1].se==v[i].se) ++j;
            assert(j-i+1>0);
            cout<<j-i+1<<' ';
            for(int k=i;k<=j;++k)
            {
                assert(v[k].fi>0);
                cout<<v[k].fi<<' ';
            }
            cout<<'\n';
            i=j;
        }
    }
}
int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);
    if(fopen(task".inp","r"))
    {
        freopen(task".inp","r",stdin);
        freopen(task".out","w",stdout);
    }
    solved();
}


#include<bits/stdc++.h>
using namespace std;
#define task "codeforces"
#define rep(i,a,b) for(int i=(a),_b=(b);i<=_b;++i)
#define per(i,b,a) for(int i=(b),_a=(a);i>=_a;--i)
#define BIT(x, i) (((x) >> (i)) & 1)
#define lb lower_bound
#define ub upper_bound
#define lla(v) (v).begin(),(v).end()
#define zs(v) int((v).size())
#define fi first
#define se second
#define pb push_back
#define mp make_pair
typedef long double ld;
typedef long long ll;
typedef pair<int,int> pii;
const int mod=1000000007; /// 998244353
const int base=311;
const int N=1e5+5;

int n,k;
string s;

void solved()
{
    cin>>n>>k;
    cin>>s;
    vector<pii> v;
    int dem=0;
    while(1)
    {
        int ok=1;
        for(int i=0;i<zs(s)-1;++i)
            ok&=(!(s[i]=='R'&&s[i+1]=='L'));
        if(ok) break;
        ++dem;
        vector<int> tam; tam.clear();
        for(int i=0;i<zs(s)-1;++i)
        if(s[i]=='R'&&s[i+1]=='L')
        {
            v.pb({i+1,dem});
            s[i]='L'; s[i+1]='R';
            ++i;
        }
    }
    if(dem>k) {cout<<-1<<'\n'; return;}
    if(zs(v)<k) {cout<<-1<<'\n'; return;}
    int cut=k-dem;
    for(int i=0;i<zs(v);++i)
    {
        if(cut)
        {
            --cut;
            cout<<1<<' '<<v[i].fi<<'\n';
            continue;
        }
        else
        {
            int j=i;
            while(j<zs(v)-1&&v[j+1].se==v[i].se) ++j;
            cout<<j-i+1<<' ';
            int cnt=0;
            for(int k=i;k<=j;++k)
            {
                cout<<v[k].fi<<' ';
                ++cnt;
            }
            assert(cnt==j-i+1);
            cout<<'\n';
            i=j;
        }
    }
}
int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);
    if(fopen(task".inp","r"))
    {
        freopen(task".inp","r",stdin);
        freopen(task".out","w",stdout);
    }
    solved();
}


#include<bits/stdc++.h>
using namespace std;
#define task "codeforces"
#define rep(i,a,b) for(int i=(a),_b=(b);i<=_b;++i)
#define per(i,b,a) for(int i=(b),_a=(a);i>=_a;--i)
#define BIT(x, i) (((x) >> (i)) & 1)
#define lb lower_bound
#define ub upper_bound
#define lla(v) (v).begin(),(v).end()
#define zs(v) int((v).size())
#define fi first
#define se second
#define pb push_back
#define mp make_pair
typedef long double ld;
typedef long long ll;
typedef pair<int,int> pii;
const int mod=1000000007; /// 998244353
const int base=311;
const int N=1e5+5;

int n,k;
string s;

void solved()
{
    cin>>n>>k;
    cin>>s;
    vector<pii> v;
    int dem=0;
    while(1)
    {
        int ok=1;
        for(int i=0;i<zs(s)-1;++i)
            ok&=(!(s[i]=='R'&&s[i+1]=='L'));
        if(ok) break;
        ++dem;
        vector<int> tam; tam.clear();
        for(int i=0;i<zs(s)-1;++i)
        if(s[i]=='R'&&s[i+1]=='L')
        {
            v.pb({i+1,dem});
            s[i]='L'; s[i+1]='R';
            ++i;
        }
    }
    if(dem>k) {cout<<-1; return;}
    if(zs(v)<k) {cout<<-1; return;}
    int cut=k-dem;
    for(int i=0;i<zs(v);++i)
    {
        if(cut)
        {
            --cut;
            cout<<1<<' '<<v[i].fi<<'\n';
            continue;
        }
        else
        {
            int j=i;
            while(j<zs(v)&&v[j+1].se==v[i].se) ++j;
            cout<<j-i+1<<' ';
            for(int k=i;k<=j;++k) cout<<v[k].fi<<' ';
            cout<<'\n';
            i=j;
        }
    }
}
int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);
    if(fopen(task".inp","r"))
    {
        freopen(task".inp","r",stdin);
        freopen(task".out","w",stdout);
    }
    solved();
}


#include<bits/stdc++.h>
using namespace std;
#define task "codeforces"
#define rep(i,a,b) for(int i=(a),_b=(b);i<=_b;++i)
#define per(i,b,a) for(int i=(b),_a=(a);i>=_a;--i)
#define BIT(x, i) (((x) >> (i)) & 1)
#define lb lower_bound
#define ub upper_bound
#define lla(v) (v).begin(),(v).end()
#define zs(v) int((v).size())
#define fi first
#define se second
#define pb push_back
#define mp make_pair
typedef long double ld;
typedef long long ll;
typedef pair<int,int> pii;
const int mod=1000000007; /// 998244353
const int base=311;
const int N=1e5+5;

int n,k;
string s;

void solved()
{
    cin>>n>>k;
    cin>>s;
    vector<pii> v;
    int dem=0;
    while(1)
    {
        int ok=1;
        for(int i=0;i<zs(s)-1;++i)
            ok&=(!(s[i]=='R'&&s[i+1]=='L'));
        if(ok) break;
        ++dem;
        vector<int> tam; tam.clear();
        for(int i=0;i<zs(s)-1;++i)
        if(s[i]=='R'&&s[i+1]=='L')
        {
            v.pb({i+1,dem});
            s[i]='L'; s[i+1]='R';
            ++i;
        }
    }
    if(dem>k) {cout<<-1<<'\n'; return;}
    if(zs(v)<k) {cout<<-1<<'\n'; return;}
    int cut=k-dem;
    for(int i=0;i<zs(v);++i)
    {
        if(cut)
        {
            assert(v[i].fi>0);
            --cut;
            cout<<1<<' '<<v[i].fi<<'\n';
            continue;
        }
        else
        {
            int j=i;
            while(j<zs(v)-1&&v[j+1].se==v[i].se) ++j;
            assert(j-i+1>0);
            cout<<j-i+1<<' ';
            for(int k=i;k<=j;++k)
            {
                assert(v[k].fi>0);
                cout<<v[k].fi<<' ';
            }
            cout<<'\n';
            i=j;
        }
    }
}
int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);
    if(fopen(task".inp","r"))
    {
        freopen(task".inp","r",stdin);
        freopen(task".out","w",stdout);
    }
    solved();
}


#include<bits/stdc++.h>
using namespace std;
#define task "codeforces"
#define rep(i,a,b) for(int i=(a),_b=(b);i<=_b;++i)
#define per(i,b,a) for(int i=(b),_a=(a);i>=_a;--i)
#define BIT(x, i) (((x) >> (i)) & 1)
#define lb lower_bound
#define ub upper_bound
#define lla(v) (v).begin(),(v).end()
#define zs(v) int((v).size())
#define fi first
#define se second
#define pb push_back
#define mp make_pair
typedef long double ld;
typedef long long ll;
typedef pair<int,int> pii;
const int mod=1000000007; /// 998244353
const int base=311;
const int N=1e5+5;

int n,k;
string s;

void solved()
{
    cin>>n>>k;
    cin>>s;
    vector<pii> v;
    int dem=0;
    while(1)
    {
        int ok=1;
        for(int i=0;i<zs(s)-1;++i)
            ok&=(!(s[i]=='R'&&s[i+1]=='L'));
        if(ok) break;
        ++dem;
        vector<int> tam; tam.clear();
        for(int i=0;i<zs(s)-1;++i)
        if(s[i]=='R'&&s[i+1]=='L')
        {
            v.pb({i+1,dem});
            s[i]='L'; s[i+1]='R';
            ++i;
        }
    }
    if(dem>k) {cout<<-1; return;}
    if(zs(v)<k) {cout<<-1; return;}
    int cut=k-dem;
    for(int i=0;i<zs(v);++i)
    {
        if(cut)
        {
            assert(v[i].fi>0);
            --cut;
            cout<<1<<' '<<v[i].fi<<'\n';
            continue;
        }
        else
        {
            int j=i;
            while(j<zs(v)-1&&v[j+1].se==v[i].se) ++j;
            assert(j-i+1>0)
            cout<<j-i+1<<' ';
            for(int k=i;k<=j;++k)
            {
                assert(v[k].fi>0);
                cout<<v[k].fi<<' ';
            }
            cout<<'\n';
            i=j;
        }
    }
}
int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);
    if(fopen(task".inp","r"))
    {
        freopen(task".inp","r",stdin);
        freopen(task".out","w",stdout);
    }
    solved();
}


// #include <bits/stdc++.h>
#include <iostream>
#include <fstream>
#include <string>
#include <functional>
#include <algorithm>
#include <cstring>
#include <iomanip>
#include <climits>
#include <cstdlib>
#include <bitset>
#include <cstdio>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <cmath>
#include <ctime>
#include <list>
#include <set>
#include <map>

#define pb push_back
#define pf push_front

#define INF 1000000007
#define INFL 1000000000000000007
#define MOD 1000000007
#define PI 3.14159265

using namespace std;

typedef long long ll;
typedef long double ld;

typedef pair<int, int> pii;
typedef pair<ld, ld> pdd;

const int dir[4][2]={{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
const int dir2[8][2]={{1, 1}, {1, 0}, {1, -1}, {0, 1}, {0, -1}, {-1, 1}, {-1, 0}, {-1, -1}};

int a[3001];

int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

    int n, k;
    int cnt=0, search=0;
    int Max=0, Min=0;
    bool turn=false;
    int i, j;

    cin >> n >> k;
    for(i=1;i<=n;i++){
        char x;
        cin >> x;
        if(x=='R')
            a[i]=1;
    }

    for(i=n;i>=1;i--)
        if(a[i]==1)
            Max+=(n-cnt)-i, Min=(n-cnt)-i, search=i, cnt++;
    cnt=1;
    for(i=1;i<=n;i++)
        if(a[i]==0){
            if(Min<i-cnt)
                turn=true;
            Min=max(Min, i-cnt), cnt++;
        }

    if(k<Min || k>Max){
        cout << -1 << endl;
        return 0;
    }
    int pre=k-Min;
    for(i=1;i<=pre;i++){
        if(!turn){
            for(j=search+1;j<n;j++){
                if(a[j]==1 && a[j+1]==0){
                    cout << 1 << " " << j << endl;
                    a[j]=0, a[j+1]=1;
                    break;
                }
            }
        }
        else{
            for(j=1;j<n;j++){
                if(a[j]==1 && a[j+1]==0){
                    cout << 1 << " " << j << endl;
                    a[j]=0, a[j+1]=1;
                    break;
                }
            }
        }
    }
    for(i=1;i<=Min;i++){
        vector<int> ans;
        for(j=1;j<n;j++){
            if(a[j]==1 && a[j+1]==0){
                ans.pb(j);
                a[j]=0, a[j+1]=1;
                j++;
            }
        }
        cout << ans.size();
        for(j=0;j<ans.size();j++)
            cout << " " << ans[j];
        cout << endl;
        ans.clear();
    }

    return 0;
}


// #include <bits/stdc++.h>
#include <iostream>
#include <fstream>
#include <string>
#include <functional>
#include <algorithm>
#include <cstring>
#include <iomanip>
#include <climits>
#include <cstdlib>
#include <bitset>
#include <cstdio>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <cmath>
#include <ctime>
#include <list>
#include <set>
#include <map>

#define pb push_back
#define pf push_front

#define INF 1000000007
#define INFL 1000000000000000007
#define MOD 1000000007
#define PI 3.14159265

using namespace std;

typedef long long ll;
typedef long double ld;

typedef pair<int, int> pii;
typedef pair<ld, ld> pdd;

const int dir[4][2]={{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
const int dir2[8][2]={{1, 1}, {1, 0}, {1, -1}, {0, 1}, {0, -1}, {-1, 1}, {-1, 0}, {-1, -1}};

int a[3001];

vector<int> ans[3000001];

int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

    int n, k;
    int i, j;

    cin >> n >> k;
    for(i=1;i<=n;i++){
        char x;
        cin >> x;
        if(x=='R')
            a[i]=1;
    }

    for(i=1;i<=k+1;i++){
        int Max=0, cnt=0;
        for(j=n;j>=1;j--)
            if(a[j]==1)
                Max+=(n-cnt)-j, cnt++;
        int left=k-i+1;
        if(left>Max){
            cout << -1 << endl;
            return 0;
        }
        if(i==k+1 && Max>0){
            cout << -1 << endl;
            return 0;
        }
        for(j=1;j<n;j++){
            if(left>Max)
                break;
            if(a[j]==1 && a[j+1]==0 && left<=Max){
                ans[i].pb(j);
                a[j]=0, a[j+1]=1;
                j++, Max--;
            }
        }
    }

    for(i=1;i<=k;i++){
        cout << ans[i].size();
        for(j=0;j<ans[i].size();j++)
            cout << " " << ans[i][j];
        cout << endl;
    }

    /*for(i=n;i>=1;i--)
        if(a[i]==1)
            Max+=(n-cnt)-i, Min=(n-cnt)-i, search=i, cnt++;
    cnt=1;
    for(i=1;i<=n;i++)
        if(a[i]==0){
            if(Min<i-cnt)
                turn=true;
            Min=max(Min, i-cnt), cnt++;
        }

    if(k<Min || k>Max){
        cout << -1 << endl;
        return 0;
    }
    int pre=k-Min;
    for(i=1;i<=pre;i++){
        if(!turn){
            for(j=search+1;j<n;j++){
                if(a[j]==1 && a[j+1]==0){
                    cout << 1 << " " << j << endl;
                    a[j]=0, a[j+1]=1;
                    break;
                }
            }
        }
        else{
            for(j=1;j<n;j++){
                if(a[j]==1 && a[j+1]==0){
                    cout << 1 << " " << j << endl;
                    a[j]=0, a[j+1]=1;
                    break;
                }
            }
        }
    }
    for(i=1;i<=Min;i++){
        vector<int> ans;
        for(j=1;j<n;j++){
            if(a[j]==1 && a[j+1]==0){
                ans.pb(j);
                a[j]=0, a[j+1]=1;
                j++;
            }
        }
        cout << ans.size();
        for(j=0;j<ans.size();j++)
            cout << " " << ans[j];
        cout << endl;
        ans.clear();
    }*/

    return 0;
}


// #include <bits/stdc++.h>
#include <iostream>
#include <fstream>
#include <string>
#include <functional>
#include <algorithm>
#include <cstring>
#include <iomanip>
#include <climits>
#include <cstdlib>
#include <bitset>
#include <cstdio>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <cmath>
#include <ctime>
#include <list>
#include <set>
#include <map>

#define pb push_back
#define pf push_front

#define INF 1000000007
#define INFL 1000000000000000007
#define MOD 1000000007
#define PI 3.14159265

using namespace std;

typedef long long ll;
typedef long double ld;

typedef pair<int, int> pii;
typedef pair<ld, ld> pdd;

const int dir[4][2]={{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
const int dir2[8][2]={{1, 1}, {1, 0}, {1, -1}, {0, 1}, {0, -1}, {-1, 1}, {-1, 0}, {-1, -1}};

int a[3001];

vector<int> ans[3000001];

int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

    int n, k;
    int i, j;

    cin >> n >> k;
    for(i=1;i<=n;i++){
        char x;
        cin >> x;
        if(x=='R')
            a[i]=1;
    }

    for(i=1;i<=k+1;i++){
        int Max=0, cnt=0;
        for(j=n;j>=1;j--)
            if(a[j]==1)
                Max+=(n-cnt)-j, cnt++;
        int left=k-i+1;
        if(left>Max){
            cout << -1 << endl;
            return 0;
        }
        if(i==k+1 && Max>0){
            cout << -1 << endl;
            return 0;
        }
        for(j=1;j<n;j++){
            if(a[j]==1 && a[j+1]==0 && left<=Max){
                ans[i].pb(j);
                a[j]=0, a[j+1]=1;
                j++, Max--;
            }
        }
        if(Max==left)
            break;
    }
    int cnt=1;
    j=1;
    for(i=i+1;i<=k;i++){
        for(j;j<=n;j++){
            if(a[j]==0){
                if(j==cnt){
                    cnt++;
                }
                else{
                    ans[i].pb(j-1);
                    a[j-1]=0, a[j]=1;
                    j--;
                    break;
                }
            }
        }
    }

    for(i=1;i<=k;i++){
        cout << ans[i].size();
        for(j=0;j<ans[i].size();j++)
            cout << " " << ans[i][j];
        cout << endl;
    }

    /*for(i=n;i>=1;i--)
        if(a[i]==1)
            Max+=(n-cnt)-i, Min=(n-cnt)-i, search=i, cnt++;
    cnt=1;
    for(i=1;i<=n;i++)
        if(a[i]==0){
            if(Min<i-cnt)
                turn=true;
            Min=max(Min, i-cnt), cnt++;
        }

    if(k<Min || k>Max){
        cout << -1 << endl;
        return 0;
    }
    int pre=k-Min;
    for(i=1;i<=pre;i++){
        if(!turn){
            for(j=search+1;j<n;j++){
                if(a[j]==1 && a[j+1]==0){
                    cout << 1 << " " << j << endl;
                    a[j]=0, a[j+1]=1;
                    break;
                }
            }
        }
        else{
            for(j=1;j<n;j++){
                if(a[j]==1 && a[j+1]==0){
                    cout << 1 << " " << j << endl;
                    a[j]=0, a[j+1]=1;
                    break;
                }
            }
        }
    }
    for(i=1;i<=Min;i++){
        vector<int> ans;
        for(j=1;j<n;j++){
            if(a[j]==1 && a[j+1]==0){
                ans.pb(j);
                a[j]=0, a[j+1]=1;
                j++;
            }
        }
        cout << ans.size();
        for(j=0;j<ans.size();j++)
            cout << " " << ans[j];
        cout << endl;
        ans.clear();
    }*/

    return 0;
}


// #include <bits/stdc++.h>
#include <iostream>
#include <fstream>
#include <string>
#include <functional>
#include <algorithm>
#include <cstring>
#include <iomanip>
#include <climits>
#include <cstdlib>
#include <bitset>
#include <cstdio>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <cmath>
#include <ctime>
#include <list>
#include <set>
#include <map>

#define pb push_back
#define pf push_front

#define INF 1000000007
#define INFL 1000000000000000007
#define MOD 1000000007
#define PI 3.14159265

using namespace std;

typedef long long ll;
typedef long double ld;

typedef pair<int, int> pii;
typedef pair<ld, ld> pdd;

const int dir[4][2]={{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
const int dir2[8][2]={{1, 1}, {1, 0}, {1, -1}, {0, 1}, {0, -1}, {-1, 1}, {-1, 0}, {-1, -1}};

int a[3001];

vector<int> ans[3000001];

int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

    int n, k;
    int i, j;

    cin >> n >> k;
    for(i=1;i<=n;i++){
        char x;
        cin >> x;
        if(x=='R')
            a[i]=1;
    }

    for(i=1;i<=k+1;i++){
        int Max=0, cnt=0;
        for(j=n;j>=1;j--)
            if(a[j]==1)
                Max+=(n-cnt)-j, cnt++;
        int left=k-i+1;
        if(left>Max){
            cout << -1 << endl;
            return 0;
        }
        if(i==k+1 && Max>0){
            cout << -1 << endl;
            return 0;
        }
        for(j=1;j<n;j++){
            if(a[j]==1 && a[j+1]==0 && left<=Max){
                ans[i].pb(j);
                a[j]=0, a[j+1]=1;
                j++, Max--;
            }
        }
        if(Max<left)
            break;
    }
    int cnt=1;
    j=1;
    for(i=i+1;i<=k;i++){
        for(j;j<=n;j++){
            if(a[j]==0){
                if(j==cnt){
                    cnt++;
                }
                else{
                    ans[i].pb(j-1);
                    a[j-1]=0, a[j]=1;
                    j--;
                    break;
                }
            }
        }
    }

    for(i=1;i<=k;i++){
        cout << ans[i].size();
        for(j=0;j<ans[i].size();j++)
            cout << " " << ans[i][j];
        cout << endl;
    }

    /*for(i=n;i>=1;i--)
        if(a[i]==1)
            Max+=(n-cnt)-i, Min=(n-cnt)-i, search=i, cnt++;
    cnt=1;
    for(i=1;i<=n;i++)
        if(a[i]==0){
            if(Min<i-cnt)
                turn=true;
            Min=max(Min, i-cnt), cnt++;
        }

    if(k<Min || k>Max){
        cout << -1 << endl;
        return 0;
    }
    int pre=k-Min;
    for(i=1;i<=pre;i++){
        if(!turn){
            for(j=search+1;j<n;j++){
                if(a[j]==1 && a[j+1]==0){
                    cout << 1 << " " << j << endl;
                    a[j]=0, a[j+1]=1;
                    break;
                }
            }
        }
        else{
            for(j=1;j<n;j++){
                if(a[j]==1 && a[j+1]==0){
                    cout << 1 << " " << j << endl;
                    a[j]=0, a[j+1]=1;
                    break;
                }
            }
        }
    }
    for(i=1;i<=Min;i++){
        vector<int> ans;
        for(j=1;j<n;j++){
            if(a[j]==1 && a[j+1]==0){
                ans.pb(j);
                a[j]=0, a[j+1]=1;
                j++;
            }
        }
        cout << ans.size();
        for(j=0;j<ans.size();j++)
            cout << " " << ans[j];
        cout << endl;
        ans.clear();
    }*/

    return 0;
}


// #include <bits/stdc++.h>
#include <iostream>
#include <fstream>
#include <string>
#include <functional>
#include <algorithm>
#include <cstring>
#include <iomanip>
#include <climits>
#include <cstdlib>
#include <bitset>
#include <cstdio>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <cmath>
#include <ctime>
#include <list>
#include <set>
#include <map>

#define pb push_back
#define pf push_front

#define INF 1000000007
#define INFL 1000000000000000007
#define MOD 1000000007
#define PI 3.14159265

using namespace std;

typedef long long ll;
typedef long double ld;

typedef pair<int, int> pii;
typedef pair<ld, ld> pdd;

const int dir[4][2]={{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
const int dir2[8][2]={{1, 1}, {1, 0}, {1, -1}, {0, 1}, {0, -1}, {-1, 1}, {-1, 0}, {-1, -1}};

int a[3001];

vector<int> ans[3000001];

int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

    int n, k;
    int i, j;

    cin >> n >> k;
    for(i=1;i<=n;i++){
        char x;
        cin >> x;
        if(x=='R')
            a[i]=1;
    }

    for(i=1;i<=k+1;i++){
        int Max=0, cnt=0;
        for(j=n;j>=1;j--)
            if(a[j]==1)
                Max+=(n-cnt)-j, cnt++;
        int left=k-i+1;
        if(i==1 && left>Max){
            cout << -1 << endl;
            return 0;
        }
        if(i==k+1 && Max>0){
            cout << -1 << endl;
            return 0;
        }
        for(j=1;j<n;j++){
            if(a[j]==1 && a[j+1]==0 && left<=Max){
                ans[i].pb(j);
                a[j]=0, a[j+1]=1;
                j++, Max--;
            }
        }
    }

    for(i=1;i<=k;i++){
        cout << ans[i].size();
        for(j=0;j<ans[i].size();j++)
            cout << " " << ans[i][j];
        cout << endl;
    }

    /*for(i=n;i>=1;i--)
        if(a[i]==1)
            Max+=(n-cnt)-i, Min=(n-cnt)-i, search=i, cnt++;
    cnt=1;
    for(i=1;i<=n;i++)
        if(a[i]==0){
            if(Min<i-cnt)
                turn=true;
            Min=max(Min, i-cnt), cnt++;
        }

    if(k<Min || k>Max){
        cout << -1 << endl;
        return 0;
    }
    int pre=k-Min;
    for(i=1;i<=pre;i++){
        if(!turn){
            for(j=search+1;j<n;j++){
                if(a[j]==1 && a[j+1]==0){
                    cout << 1 << " " << j << endl;
                    a[j]=0, a[j+1]=1;
                    break;
                }
            }
        }
        else{
            for(j=1;j<n;j++){
                if(a[j]==1 && a[j+1]==0){
                    cout << 1 << " " << j << endl;
                    a[j]=0, a[j+1]=1;
                    break;
                }
            }
        }
    }
    for(i=1;i<=Min;i++){
        vector<int> ans;
        for(j=1;j<n;j++){
            if(a[j]==1 && a[j+1]==0){
                ans.pb(j);
                a[j]=0, a[j+1]=1;
                j++;
            }
        }
        cout << ans.size();
        for(j=0;j<ans.size();j++)
            cout << " " << ans[j];
        cout << endl;
        ans.clear();
    }*/

    return 0;
}


// #include <bits/stdc++.h>
#include <iostream>
#include <fstream>
#include <string>
#include <functional>
#include <algorithm>
#include <cstring>
#include <iomanip>
#include <climits>
#include <cstdlib>
#include <bitset>
#include <cstdio>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <cmath>
#include <ctime>
#include <list>
#include <set>
#include <map>

#define pb push_back
#define pf push_front

#define INF 1000000007
#define INFL 1000000000000000007
#define MOD 1000000007
#define PI 3.14159265

using namespace std;

typedef long long ll;
typedef long double ld;

typedef pair<int, int> pii;
typedef pair<ld, ld> pdd;

const int dir[4][2]={{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
const int dir2[8][2]={{1, 1}, {1, 0}, {1, -1}, {0, 1}, {0, -1}, {-1, 1}, {-1, 0}, {-1, -1}};

int a[3001];

vector<int> ans[3000001];

int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

    int n, k;
    bool cirb=false;
    int i, j;

    cin >> n >> k;
    for(i=1;i<=n;i++){
        char x;
        cin >> x;
        if(x=='R')
            a[i]=1;
    }

    for(i=1;i<=k+1;i++){
        int Max=0, cnt=0;
        if(cirb)
            Max=k-i+1;
        else{
            for(j=n;j>=1;j--)
                if(a[j]==1)
                    Max+=(n-cnt)-j, cnt++;
        }
        int left=k-i+1;
        if(left>Max){
            cout << -1 << endl;
            return 0;
        }
        if(i==k+1 && Max>0){
            cout << -1 << endl;
            return 0;
        }
        for(j=1;j<n;j++){
            if(left>Max){
                cirb=true;
                break;
            }
            if(a[j]==1 && a[j+1]==0 && left<=Max){
                ans[i].pb(j);
                a[j]=0, a[j+1]=1;
                j++, Max--;
            }
        }
    }

    for(i=1;i<=k;i++){
        cout << ans[i].size();
        for(j=0;j<ans[i].size();j++)
            cout << " " << ans[i][j];
        cout << endl;
    }

    /*for(i=n;i>=1;i--)
        if(a[i]==1)
            Max+=(n-cnt)-i, Min=(n-cnt)-i, search=i, cnt++;
    cnt=1;
    for(i=1;i<=n;i++)
        if(a[i]==0){
            if(Min<i-cnt)
                turn=true;
            Min=max(Min, i-cnt), cnt++;
        }

    if(k<Min || k>Max){
        cout << -1 << endl;
        return 0;
    }
    int pre=k-Min;
    for(i=1;i<=pre;i++){
        if(!turn){
            for(j=search+1;j<n;j++){
                if(a[j]==1 && a[j+1]==0){
                    cout << 1 << " " << j << endl;
                    a[j]=0, a[j+1]=1;
                    break;
                }
            }
        }
        else{
            for(j=1;j<n;j++){
                if(a[j]==1 && a[j+1]==0){
                    cout << 1 << " " << j << endl;
                    a[j]=0, a[j+1]=1;
                    break;
                }
            }
        }
    }
    for(i=1;i<=Min;i++){
        vector<int> ans;
        for(j=1;j<n;j++){
            if(a[j]==1 && a[j+1]==0){
                ans.pb(j);
                a[j]=0, a[j+1]=1;
                j++;
            }
        }
        cout << ans.size();
        for(j=0;j<ans.size();j++)
            cout << " " << ans[j];
        cout << endl;
        ans.clear();
    }*/

    return 0;
}


// #include <bits/stdc++.h>
#include <iostream>
#include <fstream>
#include <string>
#include <functional>
#include <algorithm>
#include <cstring>
#include <iomanip>
#include <climits>
#include <cstdlib>
#include <bitset>
#include <cstdio>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <cmath>
#include <ctime>
#include <list>
#include <set>
#include <map>

#define pb push_back
#define pf push_front

#define INF 1000000007
#define INFL 1000000000000000007
#define MOD 1000000007
#define PI 3.14159265

using namespace std;

typedef long long ll;
typedef long double ld;

typedef pair<int, int> pii;
typedef pair<ld, ld> pdd;

const int dir[4][2]={{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
const int dir2[8][2]={{1, 1}, {1, 0}, {1, -1}, {0, 1}, {0, -1}, {-1, 1}, {-1, 0}, {-1, -1}};

int a[3001];

int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

    int n, k;
    int cnt=0, search=0;
    int Max=0, Min=0;
    int i, j;

    cin >> n >> k;
    for(i=1;i<=n;i++){
        char x;
        cin >> x;
        if(x=='R')
            a[i]=1;
    }

    for(i=n;i>=1;i--)
        if(a[i]==1)
            Max+=(n-cnt)-i, Min=(n-cnt)-i, search=i, cnt++;
    cnt=1;
    for(i=1;i<=n;i++)
        if(a[i]==0)
            Min=max(Min, i-cnt), cnt++;

    if(k<Min || k>Max){
        cout << -1 << endl;
        return 0;
    }
    int pre=k-Min;
    for(i=1;i<=pre;i++){
        for(j=search+1;j<n;j++){
            if(a[j]==1 && a[j+1]==0){
                cout << 1 << " " << j << endl;
                a[j]=0, a[j+1]=1;
                break;
            }
        }
    }
    for(i=1;i<=Min;i++){
        vector<int> ans;
        for(j=1;j<n;j++){
            if(a[j]==1 && a[j+1]==0){
                ans.pb(j);
                a[j]=0, a[j+1]=1;
                j++;
            }
        }
        cout << ans.size();
        for(j=0;j<ans.size();j++)
            cout << " " << ans[j];
        cout << endl;
        ans.clear();
    }

    return 0;
}


// #include <bits/stdc++.h>
#include <iostream>
#include <fstream>
#include <string>
#include <functional>
#include <algorithm>
#include <cstring>
#include <iomanip>
#include <climits>
#include <cstdlib>
#include <bitset>
#include <cstdio>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <cmath>
#include <ctime>
#include <list>
#include <set>
#include <map>

#define pb push_back
#define pf push_front

#define INF 1000000007
#define INFL 1000000000000000007
#define MOD 1000000007
#define PI 3.14159265

using namespace std;

typedef long long ll;
typedef long double ld;

typedef pair<int, int> pii;
typedef pair<ld, ld> pdd;

const int dir[4][2]={{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
const int dir2[8][2]={{1, 1}, {1, 0}, {1, -1}, {0, 1}, {0, -1}, {-1, 1}, {-1, 0}, {-1, -1}};

int a[3001];

int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

    int n, k;
    int cnt=0, search=INF;
    int Max=0, Min=0;
    int i, j;

    cin >> n >> k;
    for(i=1;i<=n;i++){
        char x;
        cin >> x;
        if(x=='R')
            a[i]=1;
    }

    for(i=n;i>=1;i--)
        if(a[i]==1)
            Max+=(n-cnt)-i, Min=(n-cnt)-i, search=i, cnt++;

    if(k<Min || k>Max){
        cout << -1 << endl;
        return 0;
    }
    int pre=k-Min;
    for(i=1;i<=pre;i++){
        for(j=search+1;j<n;j++){
            if(a[j]==1 && a[j+1]==0){
                cout << 1 << " " << j << endl;
                a[j]=0, a[j+1]=1;
                break;
            }
        }
    }
    for(i=1;i<=Min;i++){
        vector<int> ans;
        for(j=1;j<n;j++){
            if(a[j]==1 && a[j+1]==0){
                ans.pb(j);
                a[j]=0, a[j+1]=1;
                j++;
            }
        }
        cout << ans.size();
        for(j=0;j<ans.size();j++)
            cout << " " << ans[j];
        cout << endl;
    }
}


// #include <bits/stdc++.h>
#include <iostream>
#include <fstream>
#include <string>
#include <functional>
#include <algorithm>
#include <cstring>
#include <iomanip>
#include <climits>
#include <cstdlib>
#include <bitset>
#include <cstdio>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <cmath>
#include <ctime>
#include <list>
#include <set>
#include <map>

#define pb push_back
#define pf push_front

#define INF 1000000007
#define INFL 1000000000000000007
#define MOD 1000000007
#define PI 3.14159265

using namespace std;

typedef long long ll;
typedef long double ld;

typedef pair<int, int> pii;
typedef pair<ld, ld> pdd;

const int dir[4][2]={{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
const int dir2[8][2]={{1, 1}, {1, 0}, {1, -1}, {0, 1}, {0, -1}, {-1, 1}, {-1, 0}, {-1, -1}};

int a[3001];

vector<int> ans[3000001];

int main()
{
    int n, k;
    int i, j;

    cin >> n >> k;
    for(i=1;i<=n;i++){
        char x;
        cin >> x;
        if(x=='R')
            a[i]=1;
    }

    int Max=0, cnt=0;
    for(j=n;j>=1;j--)
        if(a[j]==1)
            Max+=(n-cnt)-j, cnt++;
    if(k>Max){
        cout << -1 << endl;
        return 0;
    }
    for(i=1;i<=k+1;i++){
        int left=k-i+1;
        if(i==k+1 && Max>0){
            cout << -1 << endl;
            return 0;
        }
        for(j=1;j<n;j++){
            if(a[j]==1 && a[j+1]==0 && left<=Max){
                ans[i].pb(j);
                a[j]=0, a[j+1]=1;
                j++, Max--;
            }
        }
        if(Max<left)
            break;
    }
    cnt=1;
    j=1;
    for(i=i+1;i<=k;i++){
        for(j;j<=n;j++){
            if(a[j]==0){
                if(j==cnt){
                    cnt++;
                }
                else{
                    ans[i].pb(j-1);
                    a[j-1]=0, a[j]=1;
                    j--;
                    break;
                }
            }
        }
    }

    for(i=1;i<=k;i++){
        printf("%lu", ans[i].size());
        for(j=0;j<ans[i].size();j++)
            printf(" %d", ans[i][j]);
        printf("\n");
    }

    /*for(i=n;i>=1;i--)
        if(a[i]==1)
            Max+=(n-cnt)-i, Min=(n-cnt)-i, search=i, cnt++;
    cnt=1;
    for(i=1;i<=n;i++)
        if(a[i]==0){
            if(Min<i-cnt)
                turn=true;
            Min=max(Min, i-cnt), cnt++;
        }

    if(k<Min || k>Max){
        cout << -1 << endl;
        return 0;
    }
    int pre=k-Min;
    for(i=1;i<=pre;i++){
        if(!turn){
            for(j=search+1;j<n;j++){
                if(a[j]==1 && a[j+1]==0){
                    cout << 1 << " " << j << endl;
                    a[j]=0, a[j+1]=1;
                    break;
                }
            }
        }
        else{
            for(j=1;j<n;j++){
                if(a[j]==1 && a[j+1]==0){
                    cout << 1 << " " << j << endl;
                    a[j]=0, a[j+1]=1;
                    break;
                }
            }
        }
    }
    for(i=1;i<=Min;i++){
        vector<int> ans;
        for(j=1;j<n;j++){
            if(a[j]==1 && a[j+1]==0){
                ans.pb(j);
                a[j]=0, a[j+1]=1;
                j++;
            }
        }
        cout << ans.size();
        for(j=0;j<ans.size();j++)
            cout << " " << ans[j];
        cout << endl;
        ans.clear();
    }*/

    return 0;
}


//#pragma comment(linker, "/stack:200000000")
//#pragma GCC optimize("Ofast")
//#pragma GCC optimize(3)
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//#pragma GCC target("sse3","sse2","sse")
//#pragma GCC target("avx","sse4","sse4.1","sse4.2","ssse3")
//#pragma GCC target("f16c")
//#pragma GCC optimize("inline","fast-math","unroll-loops","no-stack-protector")
//#pragma GCC diagnostic error "-fwhole-program"
//#pragma GCC diagnostic error "-fcse-skip-blocks"
//#pragma GCC diagnostic error "-funsafe-loop-optimizations"
//#pragma GCC diagnostic error "-std=c++14"

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update

using namespace std;
using namespace __gnu_pbds;

//find_by_order gives kth-largest element
//order_of_key gives the number of items in the set that are strictly smaller!!

// OT.find_by_order(k-1)
//
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

#define db(x) cerr << #x << "=" << x << endl
#define db2(x, y) cerr << #x << "=" << x << "," << #y << "=" << y << endl
#define db3(x, y, z) cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << endl
#define db4(x, y, z, w) cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << "," << #w << "=" << w << endl
#define ll long long
#define pb push_back
#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define mp make_pair
#define X first
#define Y second
#define sz(x) (int)((x).size())
#define pii pair<int,int>
#define MOD (ll)(998244353)
#define rep(i, n)    for(int i = 0; i < (n); ++i)
#define repA(i, a, n)  for(int i = a; i <= (n); ++i)
#define repD(i, a, n)  for(int i = a; i >= (n); --i)
#define trav(a, x) for(auto& a : x)
typedef vector<int> vi;
#define inf (ll)(1e18)
#define double long double
#define int long long

//////////////////////
const int N = (1<<20)+5;

void pre() {

}

int32_t main() {

    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    int tt = 1;
    // cin >> tt;

    // pre();
    repA(ttt,1,tt) {
        int n,k;
        cin >> n >> k;
        string st;
        cin >> st;
        vector<vector<int>> v;
        int tot = 0;
        int cnt = -1;
        while(true) {
            bool ok = 0;
            rep(i,sz(st)-1) {
                if(st[i] == 'R' and st[i+1] == 'L') {
                    if(!ok) {
                        ok = 1;
                        v.pb({i});
                        ++cnt;
                    } else v[cnt].pb(i);
                    tot++;
                    st[i] = 'L';st[i+1] = 'R';
                }
            }
            if(!ok) break;
        }
        if(k < sz(v) || k > tot) {
            cout << "-1\n";
            exit(0);
        }

        rep(i,sz(v)) {
            int j = 0;
            while(j < sz(v[i]) and sz(v)-i < k) {
                k--;
                cout << "1 " << v[i][j]+1 << '\n';
                j++;
            }
            if(j == sz(v[i])) continue;
            cout << sz(v[i]) - j << ' ';
            repA(l,j,sz(v[i])-1) cout << v[i][l]+1 << ' ';
            k--;
            cout << '\n';
        }
    }
}

// 5 -41 41 -41
// 5 -36 5  -36
//
// static int __=[](){std::ios::sync_with_stdio(false);return 0;}();


// #pragma comment(linker, "/stack:200000000")
// #pragma GCC optimize("Ofast")
// #pragma GCC optimize(3)
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// #pragma GCC target("sse3","sse2","sse")
// #pragma GCC target("avx","sse4","sse4.1","sse4.2","ssse3")
// #pragma GCC target("f16c")
// #pragma GCC optimize("inline","fast-math","unroll-loops","no-stack-protector")
// #pragma GCC diagnostic error "-fwhole-program"
// #pragma GCC diagnostic error "-fcse-skip-blocks"
// #pragma GCC diagnostic error "-funsafe-loop-optimizations"
// #pragma GCC diagnostic error "-std=c++14"
#pragma GCC optimize ("Ofast")
#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize ("-ffloat-store")

#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp> // Common file
// #include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update

using namespace std;
// using namespace __gnu_pbds;

//find_by_order gives kth-largest element
//order_of_key gives the number of items in the set that are strictly smaller!!

// OT.find_by_order(k-1)
//
// typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

#define db(x) cerr << #x << "=" << x << endl
#define db2(x, y) cerr << #x << "=" << x << "," << #y << "=" << y << endl
#define db3(x, y, z) cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << endl
#define db4(x, y, z, w) cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << "," << #w << "=" << w << endl
#define ll long long
#define pb push_back
#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define mp make_pair
#define X first
#define Y second
#define sz(x) (int)((x).size())
#define pii pair<int,int>
#define MOD (ll)(998244353)
#define rep(i, n)    for(int i = 0; i < (n); ++i)
#define repA(i, a, n)  for(int i = a; i <= (n); ++i)
#define repD(i, a, n)  for(int i = a; i >= (n); --i)
#define trav(a, x) for(auto& a : x)
typedef vector<int> vi;
#define inf (ll)(1e18)
#define double long double
// #define int long long

//////////////////////
const int N = (1<<20)+5;

void pre() {

}

int main(void) {

    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    int tt = 1;
    // cin >> tt;

    // pre();
    repA(ttt,1,tt) {
        int n,k;
        cin >> n >> k;
        string st;
        cin >> st;
        vector<vector<int>> v;
        int tot = 0;
        int cnt = -1;
        while(true) {
            bool ok = 0;
            rep(i,sz(st)-1) {
                if(st[i] == 'R' and st[i+1] == 'L') {
                    if(!ok) {
                        ok = 1;
                        v.pb({i});
                        ++cnt;
                    } else v[cnt].pb(i);
                    tot++;
                    st[i] = 'L';st[i+1] = 'R';
                    i++;
                }
            }
            if(!ok) break;
        }
        if(k < sz(v) || k > tot) {
            cout << "-1\n";
            exit(0);
        }

        rep(i,sz(v)) {
            int j = 0;
            while(j < sz(v[i]) and sz(v)-i < k) {
                k--;
                cout << "1 " << v[i][j]+1 << '\n';
                j++;
            }
            if(j == sz(v[i])) continue;
            cout << sz(v[i]) - j << ' ';
            repA(l,j,sz(v[i])-1) cout << v[i][l]+1 << ' ';
            k--;
            cout << '\n';
        }
    }
}

// 5 -41 41 -41
// 5 -36 5  -36
//
// static int __=[](){std::ios::sync_with_stdio(false);return 0;}();


//#pragma comment(linker, "/stack:200000000")
//#pragma GCC optimize("Ofast")
//#pragma GCC optimize(3)
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//#pragma GCC target("sse3","sse2","sse")
//#pragma GCC target("avx","sse4","sse4.1","sse4.2","ssse3")
//#pragma GCC target("f16c")
//#pragma GCC optimize("inline","fast-math","unroll-loops","no-stack-protector")
//#pragma GCC diagnostic error "-fwhole-program"
//#pragma GCC diagnostic error "-fcse-skip-blocks"
//#pragma GCC diagnostic error "-funsafe-loop-optimizations"
//#pragma GCC diagnostic error "-std=c++14"

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update

using namespace std;
using namespace __gnu_pbds;

//find_by_order gives kth-largest element
//order_of_key gives the number of items in the set that are strictly smaller!!

// OT.find_by_order(k-1)
//
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

#define db(x) cerr << #x << "=" << x << endl
#define db2(x, y) cerr << #x << "=" << x << "," << #y << "=" << y << endl
#define db3(x, y, z) cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << endl
#define db4(x, y, z, w) cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << "," << #w << "=" << w << endl
#define ll long long
#define pb push_back
#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define mp make_pair
#define X first
#define Y second
#define sz(x) (int)((x).size())
#define pii pair<int,int>
#define MOD (ll)(998244353)
#define rep(i, n)    for(int i = 0; i < (n); ++i)
#define repA(i, a, n)  for(int i = a; i <= (n); ++i)
#define repD(i, a, n)  for(int i = a; i >= (n); --i)
#define trav(a, x) for(auto& a : x)
typedef vector<int> vi;
#define inf (ll)(1e18)
#define double long double
#define int long long

//////////////////////
const int N = (1<<20)+5;

void pre() {

}

int32_t main() {

    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    int tt = 1;
    // cin >> tt;

    // pre();
    repA(ttt,1,tt) {
        int n,k;
        cin >> n >> k;
        string st;
        cin >> st;
        vector<vector<int>> v;
        int tot = 0;
        int cnt = -1;
        while(true) {
            bool ok = 0;
            rep(i,sz(st)-1) {
                if(st[i] == 'R' and st[i+1] == 'L') {
                    if(!ok) {
                        ok = 1;
                        v.pb({i});
                        ++cnt;
                    } else v[cnt].pb(i);
                    tot++;
                    st[i] = 'L';st[i+1] = 'R';
                    i++;
                }
            }
            if(!ok) break;
        }
        if(k < sz(v) || k > tot) {
            cout << "-1\n";
            exit(0);
        }

        rep(i,sz(v)) {
            int j = 0;
            while(j < sz(v[i]) and sz(v)-i < k) {
                k--;
                cout << "1 " << v[i][j]+1 << '\n';
                j++;
            }
            if(j == sz(v[i])) continue;
            cout << sz(v[i]) - j << ' ';
            repA(l,j,sz(v[i])-1) cout << v[i][l]+1 << ' ';
            k--;
            cout << '\n';
        }
    }
}

// 5 -41 41 -41
// 5 -36 5  -36
//
// static int __=[](){std::ios::sync_with_stdio(false);return 0;}();


// #pragma comment(linker, "/stack:200000000")
// #pragma GCC optimize("Ofast")
// #pragma GCC optimize(3)
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// #pragma GCC target("sse3","sse2","sse")
// #pragma GCC target("avx","sse4","sse4.1","sse4.2","ssse3")
// #pragma GCC target("f16c")
// #pragma GCC optimize("inline","fast-math","unroll-loops","no-stack-protector")
// #pragma GCC diagnostic error "-fwhole-program"
// #pragma GCC diagnostic error "-fcse-skip-blocks"
// #pragma GCC diagnostic error "-funsafe-loop-optimizations"
// #pragma GCC diagnostic error "-std=c++14"
#pragma GCC optimize ("Ofast")
#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize ("-ffloat-store")

#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp> // Common file
// #include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update

using namespace std;
// using namespace __gnu_pbds;

//find_by_order gives kth-largest element
//order_of_key gives the number of items in the set that are strictly smaller!!

// OT.find_by_order(k-1)
//
// typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

#define db(x) cerr << #x << "=" << x << endl
#define db2(x, y) cerr << #x << "=" << x << "," << #y << "=" << y << endl
#define db3(x, y, z) cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << endl
#define db4(x, y, z, w) cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << "," << #w << "=" << w << endl
#define ll long long
#define pb push_back
#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define mp make_pair
#define X first
#define Y second
#define sz(x) (int)((x).size())
#define pii pair<int,int>
#define MOD (ll)(998244353)
#define rep(i, n)    for(int i = 0; i < (n); ++i)
#define repA(i, a, n)  for(int i = a; i <= (n); ++i)
#define repD(i, a, n)  for(int i = a; i >= (n); --i)
#define trav(a, x) for(auto& a : x)
typedef vector<int> vi;
#define inf (ll)(1e18)
#define double long double
#define int long long

//////////////////////
const int N = (1<<20)+5;

void pre() {

}

int32_t main() {

    ios::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    int tt = 1;
    // cin >> tt;

    // pre();
    repA(ttt,1,tt) {
        int n,k;
        cin >> n >> k;
        string st;
        cin >> st;
        vector<vector<int>> v;
        int tot = 0;
        int cnt = -1;
        while(true) {
            bool ok = 0;
            rep(i,sz(st)-1) {
                if(st[i] == 'R' and st[i+1] == 'L') {
                    if(!ok) {
                        ok = 1;
                        v.pb({i});
                        ++cnt;
                    } else v[cnt].pb(i);
                    tot++;
                    st[i] = 'L';st[i+1] = 'R';
                    i++;
                }
            }
            if(!ok) break;
        }
        if(k < sz(v) || k > tot) {
            cout << "-1\n";
            exit(0);
        }

        rep(i,sz(v)) {
            int j = 0;
            while(j < sz(v[i]) and sz(v)-i < k) {
                k--;
                cout << "1 " << v[i][j]+1 << '\n';
                j++;
            }
            if(j == sz(v[i])) continue;
            cout << sz(v[i]) - j << ' ';
            repA(l,j,sz(v[i])-1) cout << v[i][l]+1 << ' ';
            k--;
            cout << '\n';
        }
    }
}

// 5 -41 41 -41
// 5 -36 5  -36
//
// static int __=[](){std::ios::sync_with_stdio(false);return 0;}();


// // #pragma comment(linker, "/stack:200000000")
// // #pragma GCC optimize("Ofast")
// // #pragma GCC optimize(3)
// // #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// // #pragma GCC target("sse3","sse2","sse")
// // #pragma GCC target("avx","sse4","sse4.1","sse4.2","ssse3")
// // #pragma GCC target("f16c")
// // #pragma GCC optimize("inline","fast-math","unroll-loops","no-stack-protector")
// // #pragma GCC diagnostic error "-fwhole-program"
// // #pragma GCC diagnostic error "-fcse-skip-blocks"
// // #pragma GCC diagnostic error "-funsafe-loop-optimizations"
// // #pragma GCC diagnostic error "-std=c++14"
// #pragma GCC optimize ("Ofast")
// #pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// #pragma GCC optimize ("-ffloat-store")

// #include <bits/stdc++.h>
// // #include <ext/pb_ds/assoc_container.hpp> // Common file
// // #include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update

// using namespace std;
// // using namespace __gnu_pbds;

// //find_by_order gives kth-largest element
// //order_of_key gives the number of items in the set that are strictly smaller!!

// // OT.find_by_order(k-1)
// //
// // typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

// #define db(x) cerr << #x << "=" << x << endl
// #define db2(x, y) cerr << #x << "=" << x << "," << #y << "=" << y << endl
// #define db3(x, y, z) cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << endl
// #define db4(x, y, z, w) cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << "," << #w << "=" << w << endl
// #define ll long long
// #define pb push_back
// #define eb emplace_back
// #define all(x) (x).begin(), (x).end()
// #define mp make_pair
// #define X first
// #define Y second
// #define sz(x) (int)((x).size())
// #define pii pair<int,int>
// #define MOD (ll)(998244353)
// #define rep(i, n)    for(int i = 0; i < (n); ++i)
// #define repA(i, a, n)  for(int i = a; i <= (n); ++i)
// #define repD(i, a, n)  for(int i = a; i >= (n); --i)
// #define trav(a, x) for(auto& a : x)
// typedef vector<int> vi;
// #define inf (ll)(1e18)
// #define double long double
// // #define int long long

// //////////////////////
// const int N = (1<<20)+5;

// void pre() {

// }

// int32_t main() {

//     ios::sync_with_stdio(false);
//     cin.tie(0);
//     cout.tie(0);

//     int tt = 1;
//     // cin >> tt;

//     // pre();
//     repA(ttt,1,tt) {
//         int n,k;
//         cin >> n >> k;
//         string st;
//         cin >> st;
//         vector<vector<int>> v;
//         int tot = 0;
//         int cnt = -1;
//         while(true) {
//             bool ok = 0;
//             rep(i,sz(st)-1) {
//                 if(st[i] == 'R' and st[i+1] == 'L') {
//                     if(!ok) {
//                         ok = 1;
//                         v.pb({i});
//                         ++cnt;
//                     } else v[cnt].pb(i);
//                     tot++;
//                     st[i] = 'L';st[i+1] = 'R';
//                     i++;
//                 }
//             }
//             if(!ok) break;
//         }
//         if(k < sz(v) || k > tot) {
//             cout << "-1\n";
//             exit(0);
//         }

//         rep(i,sz(v)) {
//             int j = 0;
//             while(j < sz(v[i]) and sz(v)-i < k) {
//                 k--;
//                 cout << "1 " << v[i][j]+1 << '\n';
//                 j++;
//             }
//             if(j == sz(v[i])) continue;
//             cout << sz(v[i]) - j << ' ';
//             repA(l,j,sz(v[i])-1) cout << v[i][l]+1 << ' ';
//             k--;
//             cout << '\n';
//         }
//     }
// }

// // 5 -41 41 -41
// // 5 -36 5  -36
// //
// // static int __=[](){std::ios::sync_with_stdio(false);return 0;}();

#pragma GCC optimize ("Ofast")
#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize ("-ffloat-store")

#include<iostream>
#include<bits/stdc++.h>
using namespace std;
#define fo(i,n)   for(i=0;i<(n);++i)
#define repA(i,j,n)   for(i=(j);i<=(n);++i)
#define repD(i,j,n)   for(i=(j);i>=(n);--i)
#define all(x) begin(x), end(x)
#define sz(x) ((lli)(x).size())
#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define endl "\n"

typedef long long int lli;
typedef long double mytype;
typedef pair<lli,lli> ii;
typedef vector<ii> vii;
typedef vector<lli> vi;

clock_t time_p=clock();
void aryanc403()
{
#ifdef ARYANC403
    time_p=clock()-time_p;
    cerr<<"Time Taken : "<<(float)(time_p)/CLOCKS_PER_SEC<<"\n";
#endif
}

#ifdef ARYANC403
#include "/home/aryan/codes/PastCodes/header.h"
#else
    #define dbg(args...)
#endif

const lli INF = 0xFFFFFFFFFFFFFFFL;

// lli seed;
// mt19937 rng(seed=chrono::steady_clock::now().time_since_epoch().count());
// inline lli rnd(lli l=0,lli r=INF)
// {return uniform_int_distribution<lli>(l,r)(rng);}

class CMP
{public:
bool operator()(ii a , ii b) //For min priority_queue .
{    return ! ( a.X < b.X || ( a.X==b.X && a.Y <= b.Y ));   }};

void add( map<lli,lli> &m, lli x,lli cnt=1)
{
    auto jt=m.find(x);
    if(jt==m.end())         m.insert({x,cnt});
    else                    jt->Y+=cnt;
}

void del( map<lli,lli> &m, lli x,lli cnt=1)
{
    auto jt=m.find(x);
    if(jt->Y<=cnt)            m.erase(jt);
    else                      jt->Y-=cnt;
}

bool cmp(const ii &a,const ii &b)
{
    return a.X<b.X||(a.X==b.X&&a.Y<b.Y);
}

const lli mod = 1000000007L;
// const lli maxN = 1000000007L;

    lli T,n,i,j,k,in,cnt,l,r,u,v,x,y;
    lli m;
    string s;
    vi a;
    vector<vi> b;
    //priority_queue < ii , vector < ii > , CMP > pq;// min priority_queue .

int main(void) {
    ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
    // freopen("txt.in", "r", stdin);
    // freopen("txt.out", "w", stdout);
// cout<<std::fixed<<std::setprecision(35);
// cin>>T;while(T--)
{

    cin>>n>>k;
    cin>>s;
    s="#"+s+"#";
    lli cnt=0;

    while(true)
    {
        vi c;
        repA(i,1,n)
        {
            if(s[i]=='R'&&s[i+1]=='L')
                c.pb(i);
        }

        if(c.empty())
            break;

        for(auto x:c)
        {
            s[x]='L';
            s[x+1]='R';
            cnt++;
        }

        b.pb(c);
    }

    if(sz(b)>k||cnt<k)
    {
        cout<<-1<<endl;
        return 0;
    }

    k-=sz(b);
    for(auto &v:b)
    {
        lli n=sz(v),i=0;
        n--;
        while(k>0&&i<n)
        {
            k--;
            cout<<1<<" "<<v[i]<<endl;
            i++;
        }

        n++;
        cout<<n-i<<" ";
        while(i<n)
        {
            cout<<v[i]<<" ";
            i++;
        }
        cout<<endl;
    }

}   aryanc403();
    return 0;
}


// #pragma comment(linker, "/stack:200000000")
// #pragma GCC optimize("Ofast")
// #pragma GCC optimize(3)
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// #pragma GCC target("sse3","sse2","sse")
// #pragma GCC target("avx","sse4","sse4.1","sse4.2","ssse3")
// #pragma GCC target("f16c")
// #pragma GCC optimize("inline","fast-math","unroll-loops","no-stack-protector")
// #pragma GCC diagnostic error "-fwhole-program"
// #pragma GCC diagnostic error "-fcse-skip-blocks"
// #pragma GCC diagnostic error "-funsafe-loop-optimizations"
// #pragma GCC diagnostic error "-std=c++14"
#pragma GCC optimize ("Ofast")
#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize ("-ffloat-store")

#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp> // Common file
// #include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update

using namespace std;
using namespace __gnu_pbds;

//find_by_order gives kth-largest element
//order_of_key gives the number of items in the set that are strictly smaller!!

// OT.find_by_order(k-1)
//
// typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

#define db(x) cerr << #x << "=" << x << endl
#define db2(x, y) cerr << #x << "=" << x << "," << #y << "=" << y << endl
#define db3(x, y, z) cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << endl
#define db4(x, y, z, w) cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << "," << #w << "=" << w << endl
#define ll long long
#define pb push_back
#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define mp make_pair
#define X first
#define Y second
#define sz(x) (int)((x).size())
#define pii pair<int,int>
#define MOD (ll)(998244353)
#define rep(i, n)    for(int i = 0; i < (n); ++i)
#define repA(i, a, n)  for(int i = a; i <= (n); ++i)
#define repD(i, a, n)  for(int i = a; i >= (n); --i)
#define trav(a, x) for(auto& a : x)
typedef vector<int> vi;
#define inf (ll)(1e18)
#define double long double
#define int long long

//////////////////////
const int N = (1<<20)+5;

void pre() {

}

int32_t main() {

    ios::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    int tt = 1;
    // cin >> tt;

    // pre();
    repA(ttt,1,tt) {
        int n,k;
        cin >> n >> k;
        string st;
        cin >> st;
        vector<vector<int>> v;
        int tot = 0;
        int cnt = -1;
        while(true) {
            bool ok = 0;
            rep(i,sz(st)-1) {
                if(st[i] == 'R' and st[i+1] == 'L') {
                    if(!ok) {
                        ok = 1;
                        v.pb({i});
                        ++cnt;
                    } else v[cnt].pb(i);
                    tot++;
                    st[i] = 'L';st[i+1] = 'R';
                    i++;
                }
            }
            if(!ok) break;
        }
        if(k < sz(v) || k > tot) {
            cout << "-1\n";
            exit(0);
        }

        rep(i,sz(v)) {
            int j = 0;
            while(j < sz(v[i]) and sz(v)-i < k) {
                k--;
                cout << "1 " << v[i][j]+1 << '\n';
                j++;
            }
            if(j == sz(v[i])) continue;
            cout << sz(v[i]) - j << ' ';
            repA(l,j,sz(v[i])-1) cout << v[i][l]+1 << ' ';
            k--;
            cout << '\n';
        }
    }
}

// 5 -41 41 -41
// 5 -36 5  -36
//
// static int __=[](){std::ios::sync_with_stdio(false);return 0;}();


// // #pragma comment(linker, "/stack:200000000")
// // #pragma GCC optimize("Ofast")
// // #pragma GCC optimize(3)
// // #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// // #pragma GCC target("sse3","sse2","sse")
// // #pragma GCC target("avx","sse4","sse4.1","sse4.2","ssse3")
// // #pragma GCC target("f16c")
// // #pragma GCC optimize("inline","fast-math","unroll-loops","no-stack-protector")
// // #pragma GCC diagnostic error "-fwhole-program"
// // #pragma GCC diagnostic error "-fcse-skip-blocks"
// // #pragma GCC diagnostic error "-funsafe-loop-optimizations"
// // #pragma GCC diagnostic error "-std=c++14"
// #pragma GCC optimize ("Ofast")
// #pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// #pragma GCC optimize ("-ffloat-store")

// #include <bits/stdc++.h>
// // #include <ext/pb_ds/assoc_container.hpp> // Common file
// // #include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update

// using namespace std;
// // using namespace __gnu_pbds;

// //find_by_order gives kth-largest element
// //order_of_key gives the number of items in the set that are strictly smaller!!

// // OT.find_by_order(k-1)
// //
// // typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

// #define db(x) cerr << #x << "=" << x << endl
// #define db2(x, y) cerr << #x << "=" << x << "," << #y << "=" << y << endl
// #define db3(x, y, z) cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << endl
// #define db4(x, y, z, w) cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << "," << #w << "=" << w << endl
// #define ll long long
// #define pb push_back
// #define eb emplace_back
// #define all(x) (x).begin(), (x).end()
// #define mp make_pair
// #define X first
// #define Y second
// #define sz(x) (int)((x).size())
// #define pii pair<int,int>
// #define MOD (ll)(998244353)
// #define rep(i, n)    for(int i = 0; i < (n); ++i)
// #define repA(i, a, n)  for(int i = a; i <= (n); ++i)
// #define repD(i, a, n)  for(int i = a; i >= (n); --i)
// #define trav(a, x) for(auto& a : x)
// typedef vector<int> vi;
// #define inf (ll)(1e18)
// #define double long double
// // #define int long long

// //////////////////////
// const int N = (1<<20)+5;

// void pre() {

// }

// int32_t main() {

//     ios::sync_with_stdio(false);
//     cin.tie(0);
//     cout.tie(0);

//     int tt = 1;
//     // cin >> tt;

//     // pre();
//     repA(ttt,1,tt) {
//         int n,k;
//         cin >> n >> k;
//         string st;
//         cin >> st;
//         vector<vector<int>> v;
//         int tot = 0;
//         int cnt = -1;
//         while(true) {
//             bool ok = 0;
//             rep(i,sz(st)-1) {
//                 if(st[i] == 'R' and st[i+1] == 'L') {
//                     if(!ok) {
//                         ok = 1;
//                         v.pb({i});
//                         ++cnt;
//                     } else v[cnt].pb(i);
//                     tot++;
//                     st[i] = 'L';st[i+1] = 'R';
//                     i++;
//                 }
//             }
//             if(!ok) break;
//         }
//         if(k < sz(v) || k > tot) {
//             cout << "-1\n";
//             exit(0);
//         }

//         rep(i,sz(v)) {
//             int j = 0;
//             while(j < sz(v[i]) and sz(v)-i < k) {
//                 k--;
//                 cout << "1 " << v[i][j]+1 << '\n';
//                 j++;
//             }
//             if(j == sz(v[i])) continue;
//             cout << sz(v[i]) - j << ' ';
//             repA(l,j,sz(v[i])-1) cout << v[i][l]+1 << ' ';
//             k--;
//             cout << '\n';
//         }
//     }
// }

// // 5 -41 41 -41
// // 5 -36 5  -36
// //
// // static int __=[](){std::ios::sync_with_stdio(false);return 0;}();

#pragma GCC optimize ("Ofast")
#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize ("-ffloat-store")

#include<iostream>
#include<bits/stdc++.h>
using namespace std;
#define fo(i,n)   for(i=0;i<(n);++i)
#define repA(i,j,n)   for(i=(j);i<=(n);++i)
#define repD(i,j,n)   for(i=(j);i>=(n);--i)
#define all(x) begin(x), end(x)
#define sz(x) ((lli)(x).size())
#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define endl "\n"

typedef long long int lli;
typedef long double mytype;
typedef pair<lli,lli> ii;
typedef vector<ii> vii;
typedef vector<lli> vi;

clock_t time_p=clock();
void aryanc403()
{
#ifdef ARYANC403
    time_p=clock()-time_p;
    cerr<<"Time Taken : "<<(float)(time_p)/CLOCKS_PER_SEC<<"\n";
#endif
}

#ifdef ARYANC403
#include "/home/aryan/codes/PastCodes/header.h"
#else
    #define dbg(args...)
#endif

const lli INF = 0xFFFFFFFFFFFFFFFL;

lli seed;
mt19937 rng(seed=chrono::steady_clock::now().time_since_epoch().count());
inline lli rnd(lli l=0,lli r=INF)
{return uniform_int_distribution<lli>(l,r)(rng);}

class CMP
{public:
bool operator()(ii a , ii b) //For min priority_queue .
{    return ! ( a.X < b.X || ( a.X==b.X && a.Y <= b.Y ));   }};

void add( map<lli,lli> &m, lli x,lli cnt=1)
{
    auto jt=m.find(x);
    if(jt==m.end())         m.insert({x,cnt});
    else                    jt->Y+=cnt;
}

void del( map<lli,lli> &m, lli x,lli cnt=1)
{
    auto jt=m.find(x);
    if(jt->Y<=cnt)            m.erase(jt);
    else                      jt->Y-=cnt;
}

bool cmp(const ii &a,const ii &b)
{
    return a.X<b.X||(a.X==b.X&&a.Y<b.Y);
}

const lli mod = 1000000007L;
// const lli maxN = 1000000007L;

    lli T,n,i,j,k,in,cnt,l,r,u,v,x,y;
    lli m;
    string s;
    vi a;
    vector<vi> b;
    //priority_queue < ii , vector < ii > , CMP > pq;// min priority_queue .

int main(void) {
    ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
    // freopen("txt.in", "r", stdin);
    // freopen("txt.out", "w", stdout);
// cout<<std::fixed<<std::setprecision(35);
// cin>>T;while(T--)
{

    cin>>n>>k;
    cin>>s;
    s="#"+s+"#";
    lli cnt=0;

    while(true)
    {
        vi c;
        repA(i,1,n)
        {
            if(s[i]=='R'&&s[i+1]=='L')
                c.pb(i);
        }

        if(c.empty())
            break;

        for(auto x:c)
        {
            s[x]='L';
            s[x+1]='R';
            cnt++;
        }

        b.pb(c);
    }

    if(sz(b)>k||cnt<k)
    {
        cout<<-1<<endl;
        return 0;
    }

    k-=sz(b);
    for(auto &v:b)
    {
        lli n=sz(v),i=0;
        n--;
        while(k>0&&i<n)
        {
            k--;
            cout<<1<<" "<<v[i]<<endl;
            i++;
        }

        n++;
        cout<<n-i<<" ";
        while(i<n)
        {
            cout<<v[i]<<" ";
            i++;
        }
        cout<<endl;
    }

}   aryanc403();
    return 0;
}


// #pragma comment(linker, "/stack:200000000")
// #pragma GCC optimize("Ofast")
// #pragma GCC optimize(3)
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// #pragma GCC target("sse3","sse2","sse")
// #pragma GCC target("avx","sse4","sse4.1","sse4.2","ssse3")
// #pragma GCC target("f16c")
// #pragma GCC optimize("inline","fast-math","unroll-loops","no-stack-protector")
// #pragma GCC diagnostic error "-fwhole-program"
// #pragma GCC diagnostic error "-fcse-skip-blocks"
// #pragma GCC diagnostic error "-funsafe-loop-optimizations"
// #pragma GCC diagnostic error "-std=c++14"
#pragma GCC optimize ("Ofast")
#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize ("-ffloat-store")

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update

using namespace std;
using namespace __gnu_pbds;

//find_by_order gives kth-largest element
//order_of_key gives the number of items in the set that are strictly smaller!!

// OT.find_by_order(k-1)
//
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

#define db(x) cerr << #x << "=" << x << endl
#define db2(x, y) cerr << #x << "=" << x << "," << #y << "=" << y << endl
#define db3(x, y, z) cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << endl
#define db4(x, y, z, w) cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << "," << #w << "=" << w << endl
#define ll long long
#define pb push_back
#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define mp make_pair
#define X first
#define Y second
#define sz(x) (int)((x).size())
#define pii pair<int,int>
#define MOD (ll)(998244353)
#define rep(i, n)    for(int i = 0; i < (n); ++i)
#define repA(i, a, n)  for(int i = a; i <= (n); ++i)
#define repD(i, a, n)  for(int i = a; i >= (n); --i)
#define trav(a, x) for(auto& a : x)
typedef vector<int> vi;
#define inf (ll)(1e18)
#define double long double
#define int long long

//////////////////////
const int N = (1<<20)+5;

void pre() {

}

int32_t main() {

    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    int tt = 1;
    // cin >> tt;

    // pre();
    repA(ttt,1,tt) {
        int n,k;
        cin >> n >> k;
        string st;
        cin >> st;
        vector<vector<int>> v;
        int tot = 0;
        int cnt = -1;
        while(true) {
            bool ok = 0;
            rep(i,sz(st)-1) {
                if(st[i] == 'R' and st[i+1] == 'L') {
                    if(!ok) {
                        ok = 1;
                        v.pb({i});
                        ++cnt;
                    } else v[cnt].pb(i);
                    tot++;
                    st[i] = 'L';st[i+1] = 'R';
                    i++;
                }
            }
            if(!ok) break;
        }
        if(k < sz(v) || k > tot) {
            cout << "-1\n";
            exit(0);
        }

        rep(i,sz(v)) {
            int j = 0;
            while(j < sz(v[i]) and sz(v)-i < k) {
                k--;
                cout << "1 " << v[i][j]+1 << '\n';
                j++;
            }
            if(j == sz(v[i])) continue;
            cout << sz(v[i]) - j << ' ';
            repA(l,j,sz(v[i])-1) cout << v[i][l]+1 << ' ';
            k--;
            cout << '\n';
        }
    }
}

// 5 -41 41 -41
// 5 -36 5  -36
//
// static int __=[](){std::ios::sync_with_stdio(false);return 0;}();


// #pragma comment(linker, "/stack:200000000")
// #pragma GCC optimize("Ofast")
// #pragma GCC optimize(3)
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// #pragma GCC target("sse3","sse2","sse")
// #pragma GCC target("avx","sse4","sse4.1","sse4.2","ssse3")
// #pragma GCC target("f16c")
// #pragma GCC optimize("inline","fast-math","unroll-loops","no-stack-protector")
// #pragma GCC diagnostic error "-fwhole-program"
// #pragma GCC diagnostic error "-fcse-skip-blocks"
// #pragma GCC diagnostic error "-funsafe-loop-optimizations"
// #pragma GCC diagnostic error "-std=c++14"
#pragma GCC optimize ("Ofast")
#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize ("-ffloat-store")

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update

using namespace std;
using namespace __gnu_pbds;

//find_by_order gives kth-largest element
//order_of_key gives the number of items in the set that are strictly smaller!!

// OT.find_by_order(k-1)
//
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

#define db(x) cerr << #x << "=" << x << endl
#define db2(x, y) cerr << #x << "=" << x << "," << #y << "=" << y << endl
#define db3(x, y, z) cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << endl
#define db4(x, y, z, w) cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << "," << #w << "=" << w << endl
#define ll long long
#define pb push_back
#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define mp make_pair
#define X first
#define Y second
#define sz(x) (int)((x).size())
#define pii pair<int,int>
#define MOD (ll)(998244353)
#define rep(i, n)    for(int i = 0; i < (n); ++i)
#define repA(i, a, n)  for(int i = a; i <= (n); ++i)
#define repD(i, a, n)  for(int i = a; i >= (n); --i)
#define trav(a, x) for(auto& a : x)
typedef vector<int> vi;
#define inf (ll)(1e18)
#define double long double
#define int long long

//////////////////////
const int N = (1<<20)+5;

void pre() {

}

int32_t main() {

    ios::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    int tt = 1;
    // cin >> tt;

    // pre();
    repA(ttt,1,tt) {
        int n,k;
        cin >> n >> k;
        string st;
        cin >> st;
        vector<vector<int>> v;
        int tot = 0;
        int cnt = -1;
        while(true) {
            bool ok = 0;
            rep(i,sz(st)-1) {
                if(st[i] == 'R' and st[i+1] == 'L') {
                    if(!ok) {
                        ok = 1;
                        v.pb({i});
                        ++cnt;
                    } else v[cnt].pb(i);
                    tot++;
                    st[i] = 'L';st[i+1] = 'R';
                    i++;
                }
            }
            if(!ok) break;
        }
        if(k < sz(v) || k > tot) {
            cout << "-1\n";
            exit(0);
        }

        rep(i,sz(v)) {
            int j = 0;
            while(j < sz(v[i]) and sz(v)-i < k) {
                k--;
                cout << "1 " << v[i][j]+1 << '\n';
                j++;
            }
            if(j == sz(v[i])) continue;
            cout << sz(v[i]) - j << ' ';
            repA(l,j,sz(v[i])-1) cout << v[i][l]+1 << ' ';
            k--;
            cout << '\n';
        }
    }
}

// 5 -41 41 -41
// 5 -36 5  -36
//
// static int __=[](){std::ios::sync_with_stdio(false);return 0;}();


// #pragma comment(linker, "/stack:200000000")
// #pragma GCC optimize("Ofast")
// #pragma GCC optimize(3)
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// #pragma GCC target("sse3","sse2","sse")
// #pragma GCC target("avx","sse4","sse4.1","sse4.2","ssse3")
// #pragma GCC target("f16c")
// #pragma GCC optimize("inline","fast-math","unroll-loops","no-stack-protector")
// #pragma GCC diagnostic error "-fwhole-program"
// #pragma GCC diagnostic error "-fcse-skip-blocks"
// #pragma GCC diagnostic error "-funsafe-loop-optimizations"
// #pragma GCC diagnostic error "-std=c++14"
#pragma GCC optimize ("Ofast")
#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize ("-ffloat-store")

#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp> // Common file
// #include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update

using namespace std;
// using namespace __gnu_pbds;

//find_by_order gives kth-largest element
//order_of_key gives the number of items in the set that are strictly smaller!!

// OT.find_by_order(k-1)
//
// typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

#define db(x) cerr << #x << "=" << x << endl
#define db2(x, y) cerr << #x << "=" << x << "," << #y << "=" << y << endl
#define db3(x, y, z) cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << endl
#define db4(x, y, z, w) cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << "," << #w << "=" << w << endl
#define ll long long
#define pb push_back
#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define mp make_pair
#define X first
#define Y second
#define sz(x) (int)((x).size())
#define pii pair<int,int>
#define MOD (ll)(998244353)
#define rep(i, n)    for(int i = 0; i < (n); ++i)
#define repA(i, a, n)  for(int i = a; i <= (n); ++i)
#define repD(i, a, n)  for(int i = a; i >= (n); --i)
#define trav(a, x) for(auto& a : x)
typedef vector<int> vi;
#define inf (ll)(1e18)
#define double long double
// #define int long long

//////////////////////
const int N = (1<<20)+5;

void pre() {

}

int32_t main() {

    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    int tt = 1;
    // cin >> tt;

    // pre();
    repA(ttt,1,tt) {
        int n,k;
        cin >> n >> k;
        string st;
        cin >> st;
        vector<vector<int>> v;
        int tot = 0;
        int cnt = -1;
        while(true) {
            bool ok = 0;
            rep(i,sz(st)-1) {
                if(st[i] == 'R' and st[i+1] == 'L') {
                    if(!ok) {
                        ok = 1;
                        v.pb({i});
                        ++cnt;
                    } else v[cnt].pb(i);
                    tot++;
                    st[i] = 'L';st[i+1] = 'R';
                    i++;
                }
            }
            if(!ok) break;
        }
        if(k < sz(v) || k > tot) {
            cout << "-1\n";
            exit(0);
        }

        rep(i,sz(v)) {
            int j = 0;
            while(j < sz(v[i]) and sz(v)-i < k) {
                k--;
                cout << "1 " << v[i][j]+1 << '\n';
                j++;
            }
            if(j == sz(v[i])) continue;
            cout << sz(v[i]) - j << ' ';
            repA(l,j,sz(v[i])-1) cout << v[i][l]+1 << ' ';
            k--;
            cout << '\n';
        }
    }
}

// 5 -41 41 -41
// 5 -36 5  -36
//
// static int __=[](){std::ios::sync_with_stdio(false);return 0;}();


#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC optimize(3)
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC target("sse3","sse2","sse")
#pragma GCC target("avx","sse4","sse4.1","sse4.2","ssse3")
#pragma GCC target("f16c")
#pragma GCC optimize("inline","fast-math","unroll-loops","no-stack-protector")
#pragma GCC diagnostic error "-fwhole-program"
#pragma GCC diagnostic error "-fcse-skip-blocks"
#pragma GCC diagnostic error "-funsafe-loop-optimizations"
#pragma GCC diagnostic error "-std=c++14"

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update

using namespace std;
using namespace __gnu_pbds;

//find_by_order gives kth-largest element
//order_of_key gives the number of items in the set that are strictly smaller!!

// OT.find_by_order(k-1)
//
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

#define db(x) cerr << #x << "=" << x << endl
#define db2(x, y) cerr << #x << "=" << x << "," << #y << "=" << y << endl
#define db3(x, y, z) cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << endl
#define db4(x, y, z, w) cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << "," << #w << "=" << w << endl
#define ll long long
#define pb push_back
#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define mp make_pair
#define X first
#define Y second
#define sz(x) (int)((x).size())
#define pii pair<int,int>
#define MOD (ll)(998244353)
#define rep(i, n)    for(int i = 0; i < (n); ++i)
#define repA(i, a, n)  for(int i = a; i <= (n); ++i)
#define repD(i, a, n)  for(int i = a; i >= (n); --i)
#define trav(a, x) for(auto& a : x)
typedef vector<int> vi;
#define inf (ll)(1e18)
#define double long double
#define int long long

//////////////////////
const int N = (1<<20)+5;

void pre() {

}

int32_t main() {

    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    int tt = 1;
    // cin >> tt;

    // pre();
    repA(ttt,1,tt) {
        int n,k;
        cin >> n >> k;
        string st;
        cin >> st;
        vector<vector<int>> v;
        int tot = 0;
        int cnt = -1;
        while(true) {
            bool ok = 0;
            rep(i,sz(st)-1) {
                if(st[i] == 'R' and st[i+1] == 'L') {
                    if(!ok) {
                        ok = 1;
                        v.pb({i});
                        ++cnt;
                    } else v[cnt].pb(i);
                    tot++;
                    st[i] = 'L';st[i+1] = 'R';
                    i++;
                }
            }
            if(!ok) break;
        }
        if(k < sz(v) || k > tot) {
            cout << "-1\n";
            exit(0);
        }

        rep(i,sz(v)) {
            int j = 0;
            while(j < sz(v[i]) and sz(v)-i < k) {
                k--;
                cout << "1 " << v[i][j]+1 << '\n';
                j++;
            }
            if(j == sz(v[i])) continue;
            cout << sz(v[i]) - j << ' ';
            repA(l,j,sz(v[i])-1) cout << v[i][l]+1 << ' ';
            k--;
            cout << '\n';
        }
    }
}

// 5 -41 41 -41
// 5 -36 5  -36
//
// static int __=[](){std::ios::sync_with_stdio(false);return 0;}();


// #pragma comment(linker, "/stack:200000000")
// #pragma GCC optimize("Ofast")
// #pragma GCC optimize(3)
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// #pragma GCC target("sse3","sse2","sse")
// #pragma GCC target("avx","sse4","sse4.1","sse4.2","ssse3")
// #pragma GCC target("f16c")
// #pragma GCC optimize("inline","fast-math","unroll-loops","no-stack-protector")
// #pragma GCC diagnostic error "-fwhole-program"
// #pragma GCC diagnostic error "-fcse-skip-blocks"
// #pragma GCC diagnostic error "-funsafe-loop-optimizations"
// #pragma GCC diagnostic error "-std=c++14"
#pragma GCC optimize ("Ofast")
#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize ("-ffloat-store")

#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp> // Common file
// #include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update

using namespace std;
using namespace __gnu_pbds;

//find_by_order gives kth-largest element
//order_of_key gives the number of items in the set that are strictly smaller!!

// OT.find_by_order(k-1)
//
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

#define db(x) cerr << #x << "=" << x << endl
#define db2(x, y) cerr << #x << "=" << x << "," << #y << "=" << y << endl
#define db3(x, y, z) cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << endl
#define db4(x, y, z, w) cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << "," << #w << "=" << w << endl
#define ll long long
#define pb push_back
#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define mp make_pair
#define X first
#define Y second
#define sz(x) (int)((x).size())
#define pii pair<int,int>
#define MOD (ll)(998244353)
#define rep(i, n)    for(int i = 0; i < (n); ++i)
#define repA(i, a, n)  for(int i = a; i <= (n); ++i)
#define repD(i, a, n)  for(int i = a; i >= (n); --i)
#define trav(a, x) for(auto& a : x)
typedef vector<int> vi;
#define inf (ll)(1e18)
#define double long double
#define int long long

//////////////////////
const int N = (1<<20)+5;

void pre() {

}

int32_t main() {

    ios::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    int tt = 1;
    // cin >> tt;

    // pre();
    repA(ttt,1,tt) {
        int n,k;
        cin >> n >> k;
        string st;
        cin >> st;
        vector<vector<int>> v;
        int tot = 0;
        int cnt = -1;
        while(true) {
            bool ok = 0;
            rep(i,sz(st)-1) {
                if(st[i] == 'R' and st[i+1] == 'L') {
                    if(!ok) {
                        ok = 1;
                        v.pb({i});
                        ++cnt;
                    } else v[cnt].pb(i);
                    tot++;
                    st[i] = 'L';st[i+1] = 'R';
                    i++;
                }
            }
            if(!ok) break;
        }
        if(k < sz(v) || k > tot) {
            cout << "-1\n";
            exit(0);
        }

        rep(i,sz(v)) {
            int j = 0;
            while(j < sz(v[i]) and sz(v)-i < k) {
                k--;
                cout << "1 " << v[i][j]+1 << '\n';
                j++;
            }
            if(j == sz(v[i])) continue;
            cout << sz(v[i]) - j << ' ';
            repA(l,j,sz(v[i])-1) cout << v[i][l]+1 << ' ';
            k--;
            cout << '\n';
        }
    }
}

// 5 -41 41 -41
// 5 -36 5  -36
//
// static int __=[](){std::ios::sync_with_stdio(false);return 0;}();


//#pragma comment(linker, "/stack:200000000")
//#pragma GCC optimize("Ofast")
//#pragma GCC optimize(3)
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//#pragma GCC target("sse3","sse2","sse")
//#pragma GCC target("avx","sse4","sse4.1","sse4.2","ssse3")
//#pragma GCC target("f16c")
//#pragma GCC optimize("inline","fast-math","unroll-loops","no-stack-protector")
//#pragma GCC diagnostic error "-fwhole-program"
//#pragma GCC diagnostic error "-fcse-skip-blocks"
//#pragma GCC diagnostic error "-funsafe-loop-optimizations"
//#pragma GCC diagnostic error "-std=c++14"

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update

using namespace std;
using namespace __gnu_pbds;

//find_by_order gives kth-largest element
//order_of_key gives the number of items in the set that are strictly smaller!!

// OT.find_by_order(k-1)
//
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

#define db(x) cerr << #x << "=" << x << endl
#define db2(x, y) cerr << #x << "=" << x << "," << #y << "=" << y << endl
#define db3(x, y, z) cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << endl
#define db4(x, y, z, w) cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << "," << #w << "=" << w << endl
#define ll long long
#define pb push_back
#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define mp make_pair
#define X first
#define Y second
#define sz(x) (int)((x).size())
#define pii pair<int,int>
#define MOD (ll)(998244353)
#define rep(i, n)    for(int i = 0; i < (n); ++i)
#define repA(i, a, n)  for(int i = a; i <= (n); ++i)
#define repD(i, a, n)  for(int i = a; i >= (n); --i)
#define trav(a, x) for(auto& a : x)
typedef vector<int> vi;
#define inf (ll)(1e18)
#define double long double
#define int long long

//////////////////////
const int N = (1<<20)+5;

void pre() {

}

int32_t main() {

    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    int tt = 1;
    // cin >> tt;

    // pre();
    repA(ttt,1,tt) {
        int n,k;
        cin >> n >> k;
        string st;
        cin >> st;
        vector<vector<int>> v;
        int tot = 0;
        int cnt = -1;
        while(true) {
            bool ok = 0;
            rep(i,sz(st)-1) {
                if(st[i] == 'R' and st[i+1] == 'L') {
                    if(!ok) {
                        ok = 1;
                        v.pb({i});
                        ++cnt;
                    } else v[cnt].pb(i);
                    tot++;
                    st[i] = 'L';st[i+1] = 'R';
                }
            }
            if(!ok) break;
        }
        if(k < sz(v) || k > tot) {
            cout << "-1\n";
            exit(0);
        }

        // for(auto ele : v[0]) cout << ele << ' ';
        // cout << '\n';

        rep(i,sz(v)) {
            int j = 0;
            while(j < sz(v[i]) and sz(v)-i < k) {
                k--;
                j++;
                cout << "1 " << v[i][j]+1 << '\n';
            }
            if(j == sz(v[i])) continue;
            cout << sz(v[i]) - j << ' ';
            repA(l,j,sz(v[i])-1) cout << v[i][l]+1 << ' ';
            k--;
            cout << '\n';
        }
    }
}

// 5 -41 41 -41
// 5 -36 5  -36
//
// static int __=[](){std::ios::sync_with_stdio(false);return 0;}();


#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
    int n, k, ans = -1;
    cin >> n >> k;
    int arr[n];
    vector<int> v;
    map<int, queue<int>> moves;
    for (int i = 0; i < n; i++)
    {
        char c;
        cin >> c;
        if (c == 'L')
        {
            arr[i] = 0;
        }
        else
        {
            arr[i] = 1;
            v.push_back(i + 1);
        }
    }
    int dp[n] = {}, nw = 0, last = n - 1, maxi = 0;
    for (int i = n - 1; i >= 0; i--)
    {
        if (arr[i])
        {
            int cur = 0;
            for (int j = i + 1; j <= last; j++)
            {
                dp[j - 1] = max({dp[j - 1], dp[j], cur}) + 1;
                maxi = max(maxi, dp[j - 1]);
                moves[dp[j - 1]].push(j);
                nw++;
                cur++;
            }
            last--;
        }
    }
    if (k <= nw && k >= maxi)
    {
        int b = 0, stop = 1, tmpK = k;
        for (int i = 1; i <= tmpK; i++)
        {
            int tmp = nw;
            queue<int> q;
            int dec = moves[stop].size();
            if (b)
                dec = 1;
            if (nw - moves[stop].size() < k - 1)
            {
                dec = (nw - k + 1);
                b = 1;
            }
            nw -= dec;
            cout << dec << " ";
            while (dec--)
            {
                cout << moves[stop].front() << " ";
                moves[stop].pop();
            }
            if (moves[stop].empty())
                stop++;
            k--;
            cout << endl;
        }
    }
    else
    {
        cout << -1;
    }
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
const int N = 1e3+2;
queue<int> moves[N];
int dp[N] , nw = 0,last,maxi = 0;
int arr[N];
int main()
{
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    int n, k;
    cin >> n >> k;
    for (int i = 0; i < n; i++)
    {
        char c;
        cin >> c;
        if (c == 'L')
            arr[i] = 0;
        else
            arr[i] = 1;
    }
    last = n - 1;
    for (int i = n - 1; i >= 0; i--)
    {
        if (arr[i])
        {
            int cur = 0;
            for (int j = i + 1; j <= last; j++)
            {
                dp[j - 1] = max({dp[j - 1], dp[j], cur}) + 1;
                maxi = max(maxi, dp[j - 1]);
                moves[dp[j - 1]].push(j);
                nw++;
                cur++;
            }
            last--;
        }
    }
    if (k <= nw && k >= maxi)
    {
        int b = 0, stop = 1, tmpK = k;
        for (int i = 1; i <= tmpK; i++)
        {
            int tmp = nw;
            int dec = moves[stop].size();
            if (b)
                dec = 1;
            if (nw - moves[stop].size() < k - 1)
            {
                dec = (nw - k + 1);
                b = 1;
            }
            nw -= dec;
            cout << dec << " ";
            while (dec--)
            {
                cout << moves[stop].front() << " ";
                moves[stop].pop();
            }
            if (moves[stop].empty())
                stop++;
            k--;
            cout << endl;
        }
    }
    else
    {
        cout << -1;
    }
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
const int N = 3e3+2;
queue<int> moves[N];
int dp[N] , nw = 0,last,maxi = 0;
int arr[N];
int main()
{
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    int n, k;
    cin >> n >> k;
    for (int i = 0; i < n; i++)
    {
        char c;
        cin >> c;
        if (c == 'L')
            arr[i] = 0;
        else
            arr[i] = 1;
    }
    last = n - 1;
    for (int i = n - 1; i >= 0; i--)
    {
        if (arr[i])
        {
            int cur = 0;
            for (int j = i + 1; j <= last; j++)
            {
                dp[j - 1] = max({dp[j - 1], dp[j], cur}) + 1;
                maxi = max(maxi, dp[j - 1]);
                moves[dp[j - 1]].push(j);
                nw++;
                cur++;
            }
            last--;
        }
    }
    if (k <= nw && k >= maxi)
    {
        int b = 0, stop = 1, tmpK = k;
        for (int i = 1; i <= tmpK; i++)
        {
            int tmp = nw;
            int dec = moves[stop].size();
            if (b)
                dec = 1;
            if (nw - moves[stop].size() < k - 1)
            {
                dec = (nw - k + 1);
                b = 1;
            }
            nw -= dec;
            printf("%d ",dec);
            while (dec--)
            {
                printf("%d ",moves[stop].front());
                moves[stop].pop();
            }
            if (moves[stop].empty())
                stop++;
            k--;
            printf("\n");
        }
    }
    else
    {
        cout << -1;
    }
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
const int N = 3e3+2;
queue<int> moves[N];
int dp[N] , nw = 0,last,maxi = 0;
int arr[N];
int main()
{
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    int n, k;
    cin >> n >> k;
    for (int i = 0; i < n; i++)
    {
        char c;
        cin >> c;
        if (c == 'L')
            arr[i] = 0;
        else
            arr[i] = 1;
    }
    last = n - 1;
    for (int i = n - 1; i >= 0; i--)
    {
        if (arr[i])
        {
            int cur = 0;
            for (int j = i + 1; j <= last; j++)
            {
                dp[j - 1] = max({dp[j - 1], dp[j], cur}) + 1;
                maxi = max(maxi, dp[j - 1]);
                moves[dp[j - 1]].push(j);
                nw++;
                cur++;
            }
            last--;
        }
    }
    if (k <= nw && k >= maxi)
    {
        int b = 0, stop = 1, tmpK = k;
        for (int i = 1; i <= tmpK; i++)
        {
            int tmp = nw;
            int dec = moves[stop].size();
            if (b)
                dec = 1;
            if (nw - moves[stop].size() < k - 1)
            {
                dec = (nw - k + 1);
                b = 1;
            }
            nw -= dec;
            cout << dec << " ";
            while (dec--)
            {
                cout << moves[stop].front() << " ";
                moves[stop].pop();
            }
            if (moves[stop].empty())
                stop++;
            k--;
            cout << "\n";
        }
    }
    else
    {
        cout << -1;
    }
}