#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse4")
using namespace std;
long long n, m, k;
long long a[1000005];
long long days[10000005], pref[10000005];
vector<pair<long long, long long> > b;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> k;
  long long i;
  for (i = 1; i <= n; i++) cin >> a[i];
  for (i = 1; i <= m; i++) {
    long long x;
    cin >> x;
    b.push_back(make_pair(x, i));
  }
  sort((b).begin(), (b).end());
  reverse((b).begin(), (b).end());
  sort(a + 1, a + n + 1);
  reverse(a + 1, a + n + 1);
  long long c = a[1];
  for (i = 1; i <= n; i++) {
    c = min(a[i], c);
    if (days[c] < k)
      days[c]++;
    else {
      c--;
      if (c < 0) break;
      days[c]++;
    }
  }
  if (i <= n) {
    cout << -1;
    return 0;
  }
  pref[0] = k - days[0];
  for (i = 1; i <= 10000000; i++) pref[i] = (k - days[i]);
  vector<long long> ans;
  long long x = b[0].first;
  for (i = 0; i < m; i++) {
    x = min(x, b[i].first);
    while (x >= 0 && pref[x] <= 0) x--;
    if (x < 0) break;
    if (pref[x] > 0) {
      pref[x]--;
      ans.push_back(b[i].second);
    }
  }
  cout << ans.size() << "\n";
  for (i = 0; i < ans.size(); i++) cout << ans[i] << " ";
}
