#include <bits/stdc++.h>
using namespace std;
int n, m, k;
int home[1000003];
int lft[10000005];
int ans[1000003];
struct milk {
  int id, day;
} store[1000003];
bool cmp(milk a, milk b) { return a.day < b.day; }
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &home[i]);
  }
  for (int i = 1; i <= m; i++) {
    scanf("%d", &store[i].day);
    store[i].id = i;
  }
  sort(home + 1, home + n + 1);
  sort(store + 1, store + m + 1, cmp);
  int numd = max(home[n] + 1, store[m].day + 1);
  for (int i = 1; i <= numd; i++) {
    lft[i] = k;
  }
  home[0] = -1;
  int pre = n;
  int j = home[n] + 1;
  for (int i = n - 1; i >= 0; i--) {
    if (home[i] == home[i + 1]) continue;
    int numm = pre - i;
    j = min(home[i + 1] + 1, j);
    while (numm && j) {
      if (numm >= lft[j]) {
        numm -= lft[j];
        lft[j--] = 0;
      } else {
        lft[j] -= numm;
        numm = 0;
        break;
      }
    }
    if (!j && numm) {
      cout << -1;
      return 0;
    }
    pre = i;
  }
  j = 1;
  for (int i = 1; i <= m; i++) {
    while (!lft[j] && j <= numd) j++;
    while (store[i].day + 1 < j && i <= m) i++;
    if (lft[j] && store[i].day + 1 >= j) {
      lft[j]--;
      ans[0]++;
      ans[ans[0]] = store[i].id;
    }
  }
  printf("%d\n", ans[0]);
  for (int i = 1; i <= ans[0]; i++) {
    printf("%d ", ans[i]);
  }
  return 0;
}
