#include <bits/stdc++.h>
using namespace std;
int a[1000005];
pair<int, int> b[1000005];
int v[2000005];
int main() {
  int i, j, k;
  int n, m;
  scanf("%d", &n);
  scanf("%d", &m);
  scanf("%d", &k);
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  sort(a, a + n);
  for (i = 0; i < m; i++) {
    scanf("%d", &b[i].first);
    b[i].second = i + 1;
  }
  b[m].first = 10000001;
  b[m].second = m + 1;
  sort(b, b + m + 1);
  reverse(b, b + m + 1);
  int l = 0, r = m, ans = -1;
  while (l <= r) {
    int y = 0;
    int mid = (l + r) / 2;
    i = 0, j = mid;
    while (j >= 0 && i < n) {
      if (a[i] < b[j].first) {
        v[y++] = a[i];
        i++;
      } else {
        v[y++] = b[j].first;
        j--;
      }
    }
    while (j >= 0) {
      v[y++] = b[j].first;
      j--;
    }
    while (i < n) {
      v[y++] = a[i];
      i++;
    }
    i = 0;
    for (j = k; j < y; j += k, i++) {
      if (v[j] <= i) break;
    }
    if (j >= y) {
      ans = max(ans, mid + 1);
      l = mid + 1;
    } else
      r = mid - 1;
  }
  if (ans == -1) {
    printf("-1\n");
  } else {
    printf("%d\n", ans - 1);
    for (i = 1; i < ans; i++) {
      printf("%d ", b[i].second);
    }
  }
  return 0;
}
