#include <bits/stdc++.h>   using namespace std;   long long n, k, x, a, b, i, j, m[1000005], f[1000005];   multiset<long long> s;   pair<long long, long long> d[1000005];   vector<long long> v;   int main() {     ios::sync_with_stdio(0);     cin >> n >> k >> x;     while (i < n) {       cin >> m[i];       i++;     }     i = 0;     while (i < k) {       cin >> d[i].first;       d[i].second = i + 1;       i++;     }     i = 0;     sort(m, m + n);     sort(d, d + k);     s.insert(1000000001);     while (i < n) {       if (x * m[i] + x < i + 1)         return cout << -1, 0;       else         f[i] = x * m[i] + x - i - 1, s.insert(f[i]);       i++;     }     i = 0;     while (i < n + 1) {       while (j < k && a < *s.begin()) {         if (x * d[j].first + x >= i + a + 1) a++, v.push_back(d[j].second);         j++;       }       s.erase(s.lower_bound(f[i]));       i++;     }     i = 0;     cout << a << endl;     while (i < a) {       cout << v[i] <<    ;       i++;     }   }   