#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int n, m, k, inta[N], exp_[int(1e7) + 10], *ae = inta, f[N], ts[N], tmp[N * 2];
pair<int, int> s[N];
int t;
int main() {
  iota(inta, inta + N, 0);
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < n; ++i) scanf("%d", f + i);
  for (int i = 0; i < m; ++i) scanf("%d", &s[i].first), s[i].second = i + 1;
  sort(s, s + m, greater<pair<int, int>>());
  for (int i = 0; i < m; ++i) ts[i] = s[i].first;
  auto anst = partition_point(inta, inta + m + 1, [](int x) {
    memset(exp_, 0, sizeof exp_);
    for (int i = 0; i < n; ++i) ++exp_[f[i]];
    for (int i = 0; i < x; ++i) ++exp_[ts[i]];
    int last = (n + x) / k + !!((n + x) % k), consumed = 0;
    for (int i = 0; i <= last; ++i) {
      if (consumed) {
        int con = min(consumed, exp_[i]);
        consumed -= con;
        exp_[i] -= con;
      }
      if (exp_[i] > k) return false;
      consumed += k - exp_[i];
    }
    return true;
  });
  if (anst == inta) return printf("%d\n", -1), 0;
  auto ans = *--anst;
  printf("%d\n", ans);
  for (int i = 0; i < ans; ++i) printf("%d ", s[i].second);
}
