#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 7;
const int maxm = 1e7 + 3;
int f[maxn];
int s1[maxn];
int s2[maxn];
int os1[maxn];
int n, m, k;
bool no_trash(int mid, bool print = false) {
  int l_pos = 0;
  int r_pos = m - mid;
  int day = 0;
  int taken = 0;
  while (l_pos < n || r_pos < m) {
    if (l_pos < n && *(f + l_pos) < day) return false;
    if (r_pos < m && *(s1 + r_pos) < day) return false;
    if (l_pos < n && r_pos < m) {
      if (*(f + l_pos) < *(s1 + r_pos))
        l_pos++;
      else
        r_pos++;
    } else if (l_pos < n)
      l_pos++;
    else
      r_pos++;
    taken++;
    if (taken == k) {
      taken = 0;
      day++;
    }
  }
  if (print) {
    for (int i = m - mid; i < m; i++) cout << *(s2 + i) << ' ';
  }
  return true;
}
int counts[maxm];
void sort_everything() {
  fill(counts, counts + maxm, 0);
  for (int i = 0; i < n; i++) counts[f[i]]++;
  int pos = 0;
  for (int i = 0; i < maxm; i++) {
    while (counts[i]) {
      f[pos++] = i;
      counts[i]--;
    }
  }
  fill(counts, counts + maxm, 0);
  for (int i = 0; i < m; i++) counts[os1[i]]++;
  pos = 0;
  for (int i = 0; i < maxm; i++) {
    while (counts[i]) {
      s1[pos++] = i;
      counts[i]--;
    }
  }
  fill(counts, counts + maxm, 0);
  for (int i = 0; i < m; i++) counts[os1[i]]++;
  for (int i = 1; i < maxm; i++) counts[i] += counts[i - 1];
  for (int i = 0; i < m; i++) {
    counts[os1[i]]--;
    s2[counts[os1[i]]] = i + 1;
  }
}
void solve() {
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) cin >> f[i];
  for (int i = 0; i < m; i++) cin >> os1[i];
  sort_everything();
  int l = 0;
  int r = m;
  while (l < r) {
    int mid = (l + r + 1) / 2;
    if (no_trash(mid))
      l = mid;
    else
      r = mid - 1;
  }
  if (l != 0) {
    cout << l << '\n';
    no_trash(l, true);
    return;
  }
  if (no_trash(0))
    cout << "0";
  else
    cout << "-1";
}
int main() {
  ios_base::sync_with_stdio(false);
  solve();
}
