#include <bits/stdc++.h>
using namespace std;
const long long infl = 1e15 + 5;
long long int m, n, p, q, x, y, cn, k, tmp1, tmp,
    mx = 0, mn, f, val, sz, sm, cntt, anns, t = 1, i, j, ind = -1, ci;
long long int a[1000006], cnt[10000033], rem;
vector<int> ans;
vector<pair<long long int, long long int> > vp;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  if (fopen("inp.txt", "r")) {
    freopen("myfile.txt", "w", stdout);
    freopen("inp.txt", "r", stdin);
  }
  cin >> n >> m >> k;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    cnt[a[i]]++;
  }
  for (i = 0; i < m; i++) {
    cin >> tmp;
    mx = max(mx, tmp);
    vp.push_back(make_pair(tmp, i + 1));
  }
  sort(vp.begin(), vp.end());
  mx = max(*max_element(a, a + n), mx);
  for (i = mx; i >= 0; i--) {
    if (cnt[i] > k) {
      long long int v1 = cnt[i];
      cnt[i] = k;
      rem += v1 - k;
    } else if (cnt[i] < k) {
      long long int v1 = min(k - cnt[i], rem);
      cnt[i] += v1;
      rem -= v1;
    }
  }
  if (rem != 0) {
    cout << "-1";
    return 0;
  }
  p = 0;
  for (i = 0; i < vp.size(); i++) {
    while (p <= mx && cnt[p] >= k) p++;
    if (p <= vp[i].first) {
      cnt[p]++;
      ans.push_back(vp[i].second);
    }
  }
  cout << ans.size() << "\n";
  for (i = 0; i < ans.size(); i++) {
    cout << ans[i] << " ";
  }
  return 0;
}
