#include <bits/stdc++.h>
using namespace std;
long long a[1000006], c[10000005], n, m, k;
pair<long long, long long> b[1000005];
bool check(long long x) {
  for (long long i = x; i >= 1; i--) {
    if ((c[b[i].first] + x - i + 1) > (b[i].first + 1) * k) return false;
  }
  return true;
}
int main() {
  cin >> n >> m >> k;
  for (long long i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  for (long long i = 1; i <= m; i++) {
    scanf("%d", &b[i].first);
    b[i].second = i;
  }
  sort(b + 1, b + 1 + m);
  reverse(b + 1, b + 1 + m);
  sort(a + 1, a + 1 + n);
  for (long long i = 1; i <= n; i++) {
    if ((i + k - 1) / k - 1 > a[i]) {
      cout << -1 << endl;
      return 0;
    }
  }
  for (long long i = 1; i <= n; i++) {
    c[a[i]]++;
  }
  for (long long i = 1; i <= 10000000; i++) {
    c[i] += c[i - 1];
  }
  long long l = 0, r = m;
  while (r >= l) {
    long long mid = (l + r) / 2;
    if (check(mid))
      l = mid + 1;
    else
      r = mid - 1;
  }
  cout << l - 1 << endl;
  for (long long i = 1; i < l; i++) {
    printf("%d ", b[i].second);
  }
  cout << endl;
}
