#include <bits/stdc++.h>
using namespace std;
int num;
struct st {
  int a, b;
};
st out[1000060];
int in[1000060], jilu[2000060], tmp[2000060], idin[1000060], idout[1000060];
int ans[1000060];
int numin[2000050];
long long sum[2000050];
int getid(int a) { return upper_bound(jilu, jilu + num, a) - jilu; }
bool cmp(st a, st b) { return a.b > b.b; }
long long k;
bool check(int a) {
  for (int i = 1; i <= a; i++) {
    numin[idout[i]]++;
  }
  for (int i = 1; i <= num; i++) {
    sum[i] = numin[i];
    sum[i] += sum[i - 1];
  }
  bool ok = 1;
  for (int i = 0; i < num; i++) {
    if (k * jilu[i] + k < sum[i + 1]) {
      ok = 0;
      break;
    }
  }
  for (int i = 1; i <= a; i++) {
    numin[idout[i]]--;
  }
  return ok;
}
int main() {
  int n, m;
  scanf("%d%d%lld", &n, &m, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", in + i);
    jilu[num++] = in[i];
  }
  for (int i = 1; i <= m; i++) {
    scanf("%d", &out[i].b);
    out[i].a = i;
    jilu[num++] = out[i].b;
  }
  sort(jilu, jilu + num);
  sort(out + 1, out + m + 1, cmp);
  num = unique(jilu, jilu + num) - jilu;
  bool ok = 0;
  for (int i = 1; i <= n; i++) {
    numin[getid(in[i])]++;
  }
  for (int i = 1; i <= m; i++) {
    idout[i] = getid(out[i].b);
  }
  int l = 0, r = m;
  while (l <= r) {
    int mid = (l + r) >> 1;
    if (check(mid)) {
      l = mid + 1;
      ok = 1;
      for (int i = 1; i <= mid; i++) {
        ans[i] = out[i].a;
      }
    } else
      r = mid - 1;
  }
  if (ok) {
    printf("%d\n", r);
    for (int i = 1; i <= r; i++) {
      printf("%d ", ans[i]);
    }
  } else
    puts("-1");
}
