#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
int cnt[10000002];
vector<pair<int, int> > v;
vector<int> ans;
int sum[2000005];
int main() {
  ios::sync_with_stdio(0);
  int n, m, k;
  cin >> n >> m >> k;
  memset(cnt, 0, sizeof(cnt));
  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    cnt[x]++;
  }
  for (int i = 0; i < m; ++i) {
    int x;
    cin >> x;
    v.push_back(make_pair(x, i + 1));
  }
  bool flag = true;
  long long mx = 0, c = 0;
  memset(sum, 0, sizeof(sum));
  int le = m + n;
  for (int i = 0; i <= le; ++i) {
    mx += k;
    c += cnt[i];
    sum[i] = c;
    if (mx < c) flag = false;
  }
  if (!flag) {
    cout << -1 << endl;
    return 0;
  }
  sort(v.begin(), v.end());
  long long mm = k, cc = 0;
  for (int i = 0; i < m; ++i) {
    mm += (v[i].first - (i == 0 ? 0 : v[i - 1].first)) * k;
    if (v[i].first > m + n) {
      ans.push_back(v[i].second);
      continue;
    }
    if (cc + sum[v[i].first] < mm) {
      cc++;
      ans.push_back(v[i].second);
    }
  }
  sort(ans.begin(), ans.end());
  int len = ans.size();
  cout << len << endl;
  if (len == 0) return 0;
  for (int i = 0; i < len - 1; ++i) {
    cout << ans[i] << " ";
  }
  cout << ans[len - 1] << endl;
}
