#include <bits/stdc++.h>
using namespace std;
const long long sz = 1e7 + 3;
vector<pair<int, int> > shop;
vector<int> a(sz + 2);
vector<long long> pref(sz + 2);
long long n, m, k;
bool f(long long x, vector<int> &b) {
  vector<long long> pp(sz + 2);
  long long i;
  for (i = 0; i < x; i++) {
    long long t = shop[i].first;
    b[t]++;
  }
  for (i = 1; i <= sz; i++) pp[i] = pp[i - 1] + b[i];
  for (i = 0; i < x; i++) {
    long long t = shop[i].first;
    b[t]--;
  }
  for (i = 1; i <= sz; i++)
    if (k * i < pp[i]) return false;
  return true;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m >> k;
  long long i;
  for (i = 0; i < n; i++) {
    long long q;
    cin >> q;
    a[q + 1]++;
  }
  for (i = 1; i <= m; i++) {
    long long t;
    cin >> t;
    shop.push_back(make_pair(t + 1, i));
  }
  a[0] = k;
  pref[0] = k;
  for (i = 1; i <= sz; i++) pref[i] = pref[i - 1] + a[i];
  for (i = 1; i <= sz; i++) {
    if (k * i + k < pref[i]) {
      cout << -1;
      return 0;
    }
  }
  if (f(m, a)) {
    cout << m << endl;
    for (i = 1; i <= m; i++) cout << i << " ";
    return 0;
  }
  sort(shop.begin(), shop.end());
  reverse(shop.begin(), shop.end());
  long long levy = 0, pravy = m;
  while (pravy - levy > 1) {
    long long mid = (pravy + levy) / 2;
    if (f(mid, a))
      levy = mid;
    else
      pravy = mid;
  }
  cout << levy << endl;
  for (i = 0; i < levy; i++) cout << shop[i].second << " ";
  return 0;
}
