#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
long long mod2 = 1e9 + 9;
double eps = 1e-9;
int n, m;
const int size = 1e6 + 2;
vector<int> fridge;
vector<pair<int, int> > store;
int k;
bool checkFridge() {
  int day = 0, ptr = 0;
  while (ptr < n) {
    if (fridge[ptr] < day) return false;
    ptr += k, day++;
  }
  return true;
}
bool check(int lo) {
  int day = 0, fp = 0, sp = lo;
  for (int kp = 0; fp < n || sp < m; ++kp) {
    if (kp == k) day++, kp = 0;
    if (sp == m || (fp < n && fridge[fp] < store[sp].first)) {
      if (fridge[fp] < day) return false;
      fp++;
    } else if (store[sp].first < day)
      return false;
    else
      sp++;
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> m >> k;
  for (int i = 0; i < n; ++i) {
    int exp;
    cin >> exp;
    fridge.push_back(exp);
  }
  sort(fridge.begin(), fridge.end());
  if (!checkFridge()) {
    cout << -1 << '\n';
    return 0;
  }
  for (int i = 0; i < m; ++i) {
    int exp;
    cin >> exp;
    store.push_back({exp, i + 1});
  }
  sort(store.begin(), store.end());
  int lo = 0, hi = m - 1;
  while (lo < hi) {
    int mid = (lo + hi) >> 1;
    if (check(mid))
      hi = mid;
    else
      lo = mid + 1;
  }
  if (!check(hi))
    cout << 0 << '\n';
  else {
    cout << m - hi << '\n';
    for (int i = hi; i < m; ++i) cout << store[i].second << " ";
  }
}
