#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 2e6;
long long cnt[MAXN];
signed main() {
  long long n, m, k;
  ios_base::sync_with_stdio(false);
  cin >> n >> m >> k;
  vector<long long> f(n);
  vector<pair<long long, long long> > s(m);
  for (long long i = 0; i < n; i++) cin >> f[i];
  for (long long i = 0; i < m; i++) cin >> s[i].first;
  for (long long i = 0; i < m; i++) s[i].second = i;
  sort(s.begin(), s.end());
  reverse(s.begin(), s.end());
  fill(cnt, cnt + MAXN, 0);
  for (auto ff : f) {
    if (ff < MAXN) {
      cnt[ff]++;
    }
  }
  long long taken = 0;
  bool flag = true;
  for (long long i = 0; flag && i < (n + k - 1) / k; i++) {
    taken += cnt[i];
    long long needed = min(n, (i + 1) * k);
    flag &= (taken <= needed);
  }
  if (!flag) {
    cout << -1 << endl;
  } else {
    long long left = 0, right = m + 1;
    while (left + 1 < right) {
      long long med = (left + right) / 2;
      for (long long i = 0; i < med; i++) {
        if (s[i].first < MAXN) {
          cnt[s[i].first]++;
        }
      }
      taken = 0;
      bool flag = true;
      for (long long i = 0; flag && i < (n + k + med - 1) / k; i++) {
        taken += cnt[i];
        long long needed = min(n + med, (i + 1) * k);
        flag &= (taken <= needed);
      }
      for (long long i = 0; i < med; i++) {
        if (s[i].first < MAXN) {
          cnt[s[i].first]--;
        }
      }
      if (flag) {
        left = med;
      } else {
        right = med;
      }
    }
    cout << left << endl;
    for (long long i = 0; i < left; i++) {
      cout << s[i].second + 1 << " ";
    }
  }
}
