#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000010;
int n, m, k, l, r;
int f[MAXN];
pair<int, int> s[MAXN];
queue<int> q;
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < n; i++) {
    scanf("%d", &f[i]);
    f[i]++;
  }
  for (int i = 0; i < m; i++) {
    scanf("%d", &s[i].first);
    s[i].first++;
    s[i].second = i + 1;
  }
  sort(f, f + n);
  sort(s, s + m);
  f[n] = s[m].first = 0x3f3f3f3f;
  int i = 0, j = 0, sum = 0;
  bool ok = true;
  while (ok && (i < n || j < m)) {
    sum++;
    if (f[i] <= s[j].first) {
      long long dt = (long long)sum - (long long)f[i++] * (long long)k;
      while (q.size() && dt > 0) {
        q.pop();
        dt--;
        sum--;
      }
      if (dt > 0) ok = false;
    } else {
      long long dt = (long long)sum - (long long)s[j].first * (long long)k;
      if (dt > 0)
        sum--;
      else {
        q.push(s[j].second);
      }
      j++;
    }
  }
  if (!ok)
    printf("-1\n");
  else {
    printf("%d\n", sum - n);
    while (!q.empty()) {
      printf("%d ", q.front());
      q.pop();
    }
    printf("\n");
  }
  return 0;
}
