#include <bits/stdc++.h>
using namespace std;
struct node {
  int x;
  int id;
} ar[1300000];
bool cmp(node a, node b) { return a.x < b.x; }
int f[1300000];
int s[1300000];
int dayf[1300000 * 10];
int days[1300000 * 10];
int n;
int main() {
  int n, m, k;
  scanf(" %d %d %d", &n, &m, &k);
  for (int i = 1; i <= n; i++) {
    scanf(" %d", &f[i]);
    dayf[f[i]]++;
  }
  for (int i = 1; i <= m; i++) {
    scanf(" %d", &s[i]);
    ar[i].x = s[i];
    ar[i].id = i;
  }
  sort(ar + 1, ar + m + 1, cmp);
  queue<int> q;
  int p = 1;
  int acc = 0;
  for (int i = 0; i <= 10000000; i++) {
    int K = k + acc;
    while (p <= m && ar[p].x < i) p++;
    if (dayf[i] < K) {
      int t = K - dayf[i];
      while (p <= m && t) {
        t--;
        q.push(ar[p++].id);
      }
      if (acc < n + m) acc += t;
      continue;
    }
    while (dayf[i] > K && !q.empty()) {
      q.pop();
      dayf[i]--;
    }
    acc = 0;
    if (dayf[i] > K) {
      printf("-1\n");
      return 0;
    }
  }
  printf("%d\n", (int)q.size());
  while (q.size()) {
    printf("%d ", q.front());
    q.pop();
  }
  printf("\n");
  return 0;
}
