#include <bits/stdc++.h>
using namespace std;
const int N = 1000005;
int a[N];
struct node {
  int id, x;
} b[N];
bool cmp(struct node &u, struct node &v) { return u.x < v.x; }
int main() {
  int n, m, k;
  scanf("%d%d%d", &n, &m, &k);
  int maxx = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    maxx = max(maxx, a[i]);
  }
  for (int i = 1; i <= m; i++) {
    scanf("%d", &b[i].x);
    b[i].id = i;
    maxx = max(maxx, b[i].x);
  }
  sort(a + 1, a + 1 + n);
  sort(b + 1, b + 1 + m, cmp);
  int cnta, cntb;
  cnta = cntb = 1;
  int pre = 0;
  long long sum = 0;
  for (int i = 0; i <= maxx; i++) {
    sum += k;
    int tmp = 0;
    while (a[cnta] == i && cnta <= n) {
      tmp++;
      cnta++;
    }
    while (b[cntb].x == i && cntb <= m) {
      tmp++;
      cntb++;
    }
    if (sum < tmp) {
      long long xx = tmp - sum;
      if (xx > cntb - 1 - pre) {
        printf("-1\n");
        return 0;
      }
      pre += xx;
      sum = 0;
    } else {
      sum -= tmp;
    }
  }
  printf("%d\n", cntb - 1 - pre);
  for (int i = pre + 1; i < cntb; i++) {
    printf("%d%c", b[i].id, i == cntb - 1 ? '\n' : ' ');
  }
}
