#include <bits/stdc++.h>
using namespace std;
int n, m, k;
const int N = 1e6 + 6;
int mp[(int)1e7 + 7];
pair<int, int> shop[N];
int fridge[N];
vector<int> a;
inline bool ok(int mid) {
  for (int i = 0; i < a.size(); ++i) mp[a[i]] = 0;
  for (int i = 0; i < n; ++i) mp[fridge[i]]++;
  for (int i = 0; i < mid; ++i) mp[shop[i].first]++;
  int days = 0, counter = 0;
  for (int i = 0; i < a.size(); ++i) {
    while (mp[a[i]] > 0) {
      mp[a[i]]--;
      if (counter == k) {
        days++;
        counter = 0;
      }
      if (days > a[i]) return 0;
      counter++;
    }
  }
  return 1;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.precision(0), cout << fixed;
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &fridge[i]);
    a.push_back(fridge[i]);
  }
  for (int i = 0; i < m; ++i) {
    scanf("%d", &shop[i].first);
    shop[i].second = i + 1;
    a.push_back(shop[i].first);
  }
  sort(a.begin(), a.end());
  sort(shop, shop + m);
  reverse(shop, shop + m);
  int ans = -1;
  int l = 0, r = m;
  while (l <= r) {
    int mid = l + (r - l) / 2;
    if (ok(mid)) {
      ans = mid;
      l = mid + 1;
    } else
      r = mid - 1;
  }
  cout << ans << '\n';
  for (int i = 0; i < ans; ++i) cout << shop[i].second << " ";
  return 0;
}
