#include <bits/stdc++.h>
using namespace std;
int n, m, k;
bool bs(int* arr, int n, int r = k) {
  int c = 0;
  for (int i = 0; i < n; i += r) {
    if (i != 0) r = k;
    if (c++ > arr[i]) return 0;
  }
  return 1;
}
int cf[10000001] = {0};
bool bs1(pair<int, int>* arr, int n, int r = k) {
  int c = 0;
  for (int i = 0; i < n; i += r) {
    if (c++ > arr[i].first) return 0;
    if (i != 0) r = k;
  }
  return 1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> m >> k;
  int a[n];
  pair<int, int> b[m + n];
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) b[i].first = a[i], b[i].second = -1;
  for (int j = n; j < n + m; j++) cin >> b[j].first, b[j].second = j - n;
  sort(a, a + n);
  if (!bs(a, n)) {
    cout << -1 << "\n";
    return 0;
  }
  int l = n - 1, r = n + m - 1;
  sort(b + n, b + n + m, greater<pair<int, int> >());
  pair<int, int> d[n + m];
  for (int i = 0; i < n + m; i++) d[i] = b[i];
  int p = -1;
  while (l <= r) {
    int m = (l + r) / 2;
    for (int i = 0; i <= m; i++) cf[b[i].first]++;
    int arr[m + 1];
    int j = 0;
    for (int i = 0; i <= 1e7; i++) {
      if (!cf[i])
        continue;
      else
        arr[j++] = i, cf[i]--, i--;
    }
    if (bs(arr, m + 1))
      p = m, l = m + 1;
    else
      r = m - 1;
  }
  l = p;
  cout << l + 1 - n << "\n";
  for (int i = 0; i <= l; i++)
    if (b[i].second != -1) cout << b[i].second + 1 << " ";
}
