#include <bits/stdc++.h>
using namespace std;
typedef struct milk {
  int ord, v;
} xx;
int n, m, k, a[1000010], l, r, mid;
xx b[1000010];
int c[1000010 * 2];
bool cmp(xx s, xx t) { return s.v > t.v; }
bool check(int x) {
  for (int i = 1; i <= n; i++) c[i] = a[i];
  for (int i = n + 1; i <= n + x; i++) c[i] = b[i - n].v;
  sort(c + 1, c + n + x + 1);
  int day = 0, i = 0, j = 0;
  for (i = 1; i <= n + x; i++) {
    if (day > c[i]) return false;
    j++;
    if (j == k) {
      j = 0;
      day++;
    }
  }
  return true;
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= m; i++) {
    scanf("%d", &b[i].v);
    b[i].ord = i;
  }
  sort(a + 1, a + n + 1);
  sort(b + 1, b + m + 1, cmp);
  if (!check(0)) {
    printf("-1\n");
    return 0;
  }
  if (!check(1)) {
    printf("0\n");
    return 0;
  }
  l = 0;
  r = m + 1;
  while (l + 1 < r) {
    mid = (l + r) / 2;
    if (check(mid)) {
      l = mid;
    } else
      r = mid;
  }
  printf("%d\n", l);
  for (int i = 1; i <= l; i++) printf("%d ", b[i].ord);
  printf("\n");
  return 0;
}
