#include <bits/stdc++.h>
using namespace std;
const int N = 20000002, M = 1000002;
int n, m, k, a[N];
pair<int, int> b[M];
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = (1); i <= (int)(n); ++i) {
    int x;
    scanf("%d", &x);
    ++a[x];
    if (a[x] > k) cout << -1, exit(0);
  }
  for (int i = (1); i <= (int)(m); ++i)
    scanf("%d", &b[i].first), b[i].second = i;
  sort(b + 1, b + 1 + m);
  vector<int> ans;
  int i = 0, j = 1;
  while (j <= m) {
    while (a[i] == k) ++i;
    if (i <= b[j].first) ++a[i], ans.push_back(b[j].second);
    ++j;
  }
  cout << (((int)(ans).size())) << endl;
  for (int i : ans) printf("%d ", i);
}
