#include <bits/stdc++.h>
using namespace std;
void pass() { return; }
const double EPS = 1e-6;
mt19937 rnd(rand() << 15 + rand());
const long long MOD = 1e9 + 7;
const long long BIG_MOD = 1e18 + 7;
const long long MAXN = 1e5 + 7;
vector<long long> a;
vector<pair<long long, long long> > b;
long long n, m, k;
bool check(long long mid) {
  vector<long long> res;
  long long i = 0;
  long long j = m - mid;
  for (long long it = 0; it < n + mid; ++it) {
    if (i == n || (j < m && b[j].first < a[i])) {
      res.push_back(b[j].first);
      ++j;
    } else {
      res.push_back(a[i]);
      ++i;
    }
  }
  for (long long i = 0; i < n + mid; ++i) {
    long long klv = i + 1;
    long long day = (klv - 1) / k + 1;
    if (day - 1 > res[i]) {
      return false;
    }
  }
  return true;
}
signed main() {
  cout.tie(NULL);
  cout.precision(20);
  scanf("%I64d%I64d%I64d", &n, &m, &k);
  a.resize(n);
  b.resize(m);
  for (long long i = 0; i < n; ++i) {
    scanf("%I64d", &a[i]);
  }
  for (long long i = 0; i < m; ++i) {
    scanf("%I64d", &b[i].first);
    b[i].second = i;
  }
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  long long l = -1;
  long long r = m + 1;
  while (l < r - 1) {
    long long mid = (l + r) / 2;
    if (check(mid)) {
      l = mid;
    } else {
      r = mid;
    }
  }
  if (l == -1) {
    cout << "-1\n";
    return 0;
  }
  cout << l << '\n';
  for (long long i = m - l; i < m; ++i) {
    cout << b[i].second + 1 << ' ';
  }
  return 0;
}
