#include <bits/stdc++.h>
using namespace std;
int a[1000001], ar[1000001];
pair<int, int> b[1000001];
int n, m, k, i, j;
vector<int> victor;
bool check(vector<int> &v, int t) {
  for (int i = 0; i < (t - 1) / k + 1; i++) {
    if (v[k * i] < i) return false;
  }
  return true;
}
vector<int> kefir;
bool check(int t) {
  merge(a, a + n, ar + m - t, ar + m, kefir.begin());
  return check(kefir, n + t);
}
int binary_search() {
  int l = 0, r = m, c, ans = -1;
  while (l <= r) {
    c = (l + r) / 2;
    if (check(c)) {
      ans = c;
      l = c + 1;
    } else
      r = c - 1;
  }
  return ans;
}
int main() {
  cin >> n >> m >> k;
  kefir.resize(n + m);
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  for (i = 0; i < m; i++) {
    scanf("%d", &b[i].first);
    b[i].second = i;
  }
  sort(a, a + n);
  sort(b, b + m);
  for (int i = 0; i < m; i++) {
    ar[i] = b[i].first;
  }
  int LA = binary_search();
  cout << LA << "\n";
  for (int i = m - LA; i < m; i++) {
    printf("%d%c", b[i].second + 1, ' ');
  }
  return 0;
}
