#include <bits/stdc++.h>
using namespace std;
int n, m, k;
pair<int, int> f[1000006], s[1000006];
bool comp(pair<int, int> x, pair<int, int> y) { return x.first > y.first; }
bool pos(int idx) {
  int ii = 0, jj = idx, kk;
  for (int i = 0; 1; i++) {
    kk = k;
    while (kk--) {
      if (ii >= n && jj < 0) {
        return true;
      } else if (ii >= n) {
        if (s[jj].first < i) return false;
        jj--;
      } else if (jj < 0) {
        if (f[ii].first < i) return false;
        ii++;
      } else if (f[ii].first < s[jj].first) {
        if (f[ii].first < i) return false;
        ii++;
      } else {
        if (s[jj].first < i) return false;
        jj--;
      }
    }
  }
  return true;
}
int main() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) {
    cin >> f[i].first;
    f[i].second = i;
  }
  for (int i = 0; i < m; i++) {
    cin >> s[i].first;
    s[i].second = i;
  }
  sort(f, f + n);
  sort(s, s + m, comp);
  for (int i = 0; i < n; i++) {
    if (f[i].first < (i / k)) {
      cout << -1;
      return 0;
    }
  }
  int st = 0, en = m - 1, mid;
  while (st < en) {
    mid = (st + en) / 2;
    if (pos(mid)) {
      st = mid + 1;
    } else {
      en = mid - 1;
    }
  }
  if (!pos(st)) st--;
  cout << st + 1 << "\n";
  for (int i = 0; i <= st; i++) {
    cout << s[i].second + 1 << " ";
  }
}
