#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10, M = 1e7 + 10;
int n, m, k;
int last[M];
struct node {
  int n;
  int t;
} shop[N];
long long s[M];
int ans[N], nans;
int maxt;
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m >> k;
  for (int i = 1; i <= n; i++) {
    int t;
    cin >> t;
    maxt = max(maxt, t + 1);
    s[t + 1]++;
  }
  for (int i = 1; i <= m; i++) {
    cin >> shop[i].t;
    shop[i].t++;
    maxt = max(maxt, shop[i].t);
    shop[i].n = last[shop[i].t];
    last[shop[i].t] = i;
  }
  for (int i = 1; i <= maxt; i++) {
    s[i] = s[i - 1] + k - s[i];
    if (s[i] < 0) {
      cout << "-1" << endl;
      return 0;
    }
  }
  long long maxl = s[maxt];
  for (int i = maxt; i >= 1; i--) {
    maxl = min(maxl, s[i]);
    for (int j = last[i]; j > 0 && maxl > 0; j = shop[j].n) {
      ans[++nans] = j;
      maxl--;
    }
  }
  cout << nans << endl;
  for (int i = 1; i <= nans; i++) cout << ans[i] << " ";
  return 0;
}
