#include <bits/stdc++.h>
 
#define X first
#define Y second
 
using namespace std;
 
typedef pair<int, int> ipair;
 
const int MAXN = 200200;
const int MAXM = MAXN;
 
int n, m, k;
ipair arr[MAXN];
ipair* fre[MAXM << 1];
bool used[MAXN];
set<ipair*> NZ;

inline bool comp(const ipair& a, const ipair& b) {
    return a.X > b.X;
}

void build() {
    stable_sort(arr, arr + n, comp);
    for (int i = 0; i < n; ++i)
        NZ.insert(arr + i);
}
 
int solve() {
    for (int j = 0; j < m; ++j) {
        if (fre[j]) {
            fre[j + k] = fre[j];
            continue;
        }
        if (NZ.empty()) return -1;
        auto it = *NZ.begin();
        it->X--;
        if (!it->X) NZ.erase(it);
        fre[j + k] = it;
        used[it->Y] = true;
    }
    return n - count(used, used + n, true);
}
 
int main() {
    cin >> n >> m >> k;
    for (int i = 0; i < n; ++i) {
        cin >> arr[i].X;
        arr[i].Y = i;
    }
    build();
    int ans = solve();
    cout << ans << endl;
    if (ans == -1) return 0;
    for (int i = 0; i < n; ++i)
        if (!used[i]) cout << i + 1 << ' ';
    cout << endl;
    for (int j = 0; j < m; ++j)
        cout << fre[j + k]->Y + 1 << ' ';
    cout << endl;
}
