#include <bits/stdc++.h>
using namespace std;
int testsNumber = 1;
const int nmax = 1e6 + 6;
const int valmax = 1e7 + 5;
int n, m, K;
int f[nmax];
pair<int, int> s[nmax];
int maxEl;
int cntEl[valmax];
void reset() {}
bool check(int cnt) {
  vector<int> v;
  for (int i = 0; i <= maxEl; ++i) {
    cntEl[i] = 0;
  }
  for (int i = 1; i <= n; ++i) {
    cntEl[f[i]]++;
  }
  for (int i = 1; i <= cnt; ++i) {
    cntEl[s[i].first]++;
  }
  int currDay = 0;
  int currK = 0;
  for (int i = 0; i <= maxEl; ++i) {
    if (cntEl[i] == 0) {
      continue;
    }
    currK += cntEl[i];
    if (currK >= K) {
      int exces = currK - K;
      cntEl[i] = exces;
      currDay++;
      if (exces > 0 && currDay > i) {
        return false;
      }
      int cat = cntEl[i] / K;
      int rest = cntEl[i] % K;
      if (rest > 1) {
      }
      currDay += cat;
      currK = rest;
      if (currDay > i && rest > 0) {
        return false;
      }
      if (currDay - 1 > i) {
        return false;
      }
    }
  }
  return true;
}
void solve() {
  scanf("%d %d %d\n", &n, &m, &K);
  for (int i = 1; i <= n; ++i) {
    int x;
    scanf("%d", &x);
    f[i] = x;
    maxEl = max(maxEl, f[i]);
  }
  for (int i = 1; i <= m; ++i) {
    int x;
    scanf("%d", &x);
    s[i] = make_pair(x, i);
    maxEl = max(maxEl, s[i].first);
  }
  sort(s + 1, s + m + 1);
  reverse(s + 1, s + m + 1);
  int st = -1;
  int dr = m + 1;
  while (dr - st > 1) {
    int mij = (st + dr) / 2;
    if (check(mij)) {
      st = mij;
    } else {
      dr = mij;
    }
  }
  if (st == -1) {
    cout << -1 << "\n";
    return;
  }
  cout << st << "\n";
  for (int i = 1; i <= st; ++i) {
    cout << s[i].second << " ";
  }
  cout << "\n";
}
int main() {
  ios::sync_with_stdio(false);
  for (int currTest = 1; currTest <= testsNumber; ++currTest) {
    reset();
    solve();
  }
  return 0;
}
