#include <bits/stdc++.h>
using namespace std;
long long MOD = 1e9 + 7;
long long INF = 1e16 + 7;
long long n, m, k;
long long v[10000003];
long long a[1000003];
pair<long long, long long> p[1000003];
vector<long long> res;
int main() {
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) scanf("%I64d", &a[i]);
  sort(a, a + n);
  long long pp = n - 1;
  long long sum = 0;
  for (int i = 1e7 - 1; i >= 0; i--) {
    while (a[pp] >= i && pp >= 0 && v[i] < k) {
      v[i]++;
      sum++;
      pp--;
    }
  }
  if (sum != n) {
    cout << -1;
    return 0;
  }
  for (int i = 0; i < m; i++) {
    scanf("%I64d", &p[i].first);
    p[i].second = i + 1;
  }
  sort(p, p + m);
  pp = m - 1;
  for (int i = 1e7 - 1; i >= 0; i--) {
    while (p[pp].first >= i && pp >= 0 && v[i] < k) {
      v[i]++;
      pp--;
      res.push_back(p[pp + 1].second);
    }
  }
  cout << res.size() << endl;
  for (int i = 0; i < res.size(); i++) cout << res[i] << " ";
  return 0;
}
