#include <bits/stdc++.h>
template <class T>
inline T lowbit(T x) {
  return x & (-x);
}
template <class T>
inline T sqr(T x) {
  return x * x;
}
template <class T>
inline bool scan(T &ret) {
  char c;
  int sgn;
  if (c = getchar(), c == EOF) return 0;
  while (c != '-' && (c < '0' || c > '9')) c = getchar();
  sgn = (c == '-') ? -1 : 1;
  ret = (c == '-') ? 0 : (c - '0');
  while (c = getchar(), c >= '0' && c <= '9') ret = ret * 10 + (c - '0');
  ret *= sgn;
  return 1;
}
const double pi = 3.14159265358979323846264338327950288L;
using namespace std;
int n, m, k, a[10000005], fa[10000005];
vector<int> ans;
struct node {
  int num, id;
  bool operator<(const node &_) const { return num > _.num; }
};
priority_queue<node> gg;
int Find(int x) { return x == fa[x] ? fa[x] : fa[x] = Find(fa[x]); }
int main() {
  while (!gg.empty()) gg.pop();
  cin >> n >> m >> k;
  memset(a, 0, sizeof(a));
  for (int i = 1; i <= n; i++) {
    int num;
    scan(num);
    num++;
    a[num]++;
  }
  for (int i = 0; i < 10000005; i++) fa[i] = i;
  for (int i = 1; i <= m; i++) {
    int num;
    scan(num);
    num++;
    gg.push((node){num, i});
  }
  for (int i = 1; i < 10000005; i++) {
    if (a[i] < k)
      continue;
    else if (a[i] == k) {
      fa[i] = Find(i - 1);
    } else if (a[i] > k) {
      while (a[i] > k) {
        int pre = Find(i - 1);
        if (pre == 0) {
          cout << -1 << endl;
          return 0;
        }
        a[pre]++;
        a[i]--;
        if (a[pre] == k) {
          fa[pre] = Find(pre - 1);
        }
      }
      fa[i] = Find(i - 1);
    }
  }
  ans.clear();
  for (int i = 1; i < 10000005; i++) {
    if (gg.empty()) break;
    while (!gg.empty() && gg.top().num < i) gg.pop();
    while (a[i] < k && !gg.empty() && gg.top().num >= i) {
      a[i]++;
      ans.push_back(gg.top().id);
      gg.pop();
    }
  }
  int sz = ans.size();
  printf("%d\n", sz);
  for (int i = 0; i < sz; i++) {
    printf("%d ", ans[i]);
  }
  return 0;
}
