#include <bits/stdc++.h>
using namespace std;
int freq[10000005];
int freq2[10000005];
int cnt[10000005];
int ab[10000005];
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  ;
  int n, m, k;
  cin >> n >> m >> k;
  int b;
  int maxs = -1;
  for (int i = 0; i < n; i++) {
    cin >> b;
    freq[b]++;
    maxs = max(maxs, b);
  }
  for (int i = maxs; i > 0; i--) {
    if (freq[i] > k) freq[i - 1] += freq[i] - k;
  }
  int flag = 1;
  if (freq[0] > k) flag = 0;
  int maxs2 = -1;
  for (int i = 0; i < m && flag; i++) {
    cin >> b;
    ab[i] = b;
    freq2[b]++;
    maxs2 = max(maxs2, b);
  }
  for (int i = 0; i <= max(maxs2, maxs); i++) freq[i] = k - freq[i];
  int i = maxs2, j = maxs2;
  while (i >= 0 && j >= 0 && flag) {
    if (i == j && freq2[j] <= freq[i]) {
      cnt[j] += freq2[j];
      freq[i] -= freq2[j];
      freq2[j] = 0;
      i--;
      j--;
    } else if (i < j && freq2[j] <= freq[i]) {
      cnt[j] += freq2[j];
      freq[i] -= freq2[j];
      freq2[j] = 0;
      j--;
      if (freq[i] == 0) {
        i--;
      }
    } else if (i <= j && freq2[j] > freq[i]) {
      cnt[j] += freq[i];
      freq2[j] -= freq[i];
      freq[i] = 0;
      i--;
    } else if (i > j) {
      i--;
    }
  }
  if (!flag) {
    cout << "-1";
  } else {
    vector<int> v;
    for (int i = 0; i < m; i++) {
      if (cnt[ab[i]] > 0) {
        v.push_back(i + 1);
        cnt[ab[i]]--;
      }
    }
    cout << v.size() << "\n";
    for (int i = 0; i < v.size(); i++) {
      cout << v[i] << " ";
    }
  }
  return 0;
}
