#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int MAXN = 1000005;
int n, m, k, f[MAXN];
pair<int, int> s[MAXN];
int ha[MAXN * 10];
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &f[i]);
    ha[f[i]]++;
  }
  for (int i = 1; i <= m; i++) scanf("%d", &s[i].first), s[i].second = i;
  sort(s + 1, s + 1 + m);
  int cnt = 0, now = 0;
  for (int i = MAXN * 10 - 1; i >= 0; i--) {
    if (ha[i] > k)
      now += ha[i] - k, ha[i] = k;
    else {
      int tmp = min(k - ha[i], now);
      now -= tmp, ha[i] += tmp;
    }
  }
  stack<int> ans;
  if (now > 0) return 0 * printf("-1\n");
  now = 0;
  for (int i = 1; i <= m; i++) {
    while (k - ha[now] <= 0 && s[i].first >= now) {
      now++;
    }
    if (k - ha[now] > 0 && s[i].first >= now) {
      ans.push(s[i].second);
      ha[now]++;
      cnt++;
    }
  }
  printf("%d\n", cnt);
  while (!ans.empty()) printf("%d ", ans.top()), ans.pop();
}
