#include <bits/stdc++.h>
using namespace std;
long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int n, m, k, a[10000050];
vector<int> b[10000050], ans;
int main() {
  n = read(), m = read(), k = read();
  for (int i = 1; i <= n; i++) a[read() + 1]++;
  for (int i = 1; i <= m; i++) b[read() + 1].push_back(i);
  vector<int> rec;
  int cnt = 0;
  for (int i = 10000001; i > 0; i--) {
    cnt += a[i];
    for (int j = 0; j < b[i].size(); j++) rec.push_back(b[i][j]);
    if (cnt >= k) {
      cnt -= k;
      continue;
    }
    while (rec.size() && cnt < k) {
      ans.push_back(rec[rec.size() - 1]);
      rec.pop_back();
      cnt++;
    }
    cnt = 0;
  }
  if (cnt) {
    printf("-1");
    return 0;
  }
  printf("%d\n", ans.size());
  for (int i = 0; i < ans.size(); i++) {
    if (i) printf(" ");
    printf("%d", ans[i]);
  }
  return 0;
  return 0;
}
