#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
int n;
int m;
int k;
int f[N];
pair<int, int> s[N];
bool can(int j) {
  int i = 1, carton, bought = 0;
  while (i <= n || j <= m) {
    if (i == n + 1) {
      carton = s[j++].first;
    } else if (j == m + 1) {
      carton = f[i++];
    } else if (s[j].first < f[i]) {
      carton = s[j++].first;
    } else {
      carton = f[i++];
    }
    if (carton < bought / k) return 0;
    bought++;
  }
  return 1;
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &f[i]);
  }
  for (int i = 1; i <= m; i++) {
    scanf("%d", &s[i].first);
    s[i].second = i;
  }
  sort(f + 1, f + n + 1);
  sort(s + 1, s + m + 1);
  if (!can(m + 1)) {
    puts("-1");
    return 0;
  }
  int l = 1;
  int r = m + 1;
  while (l < r) {
    int mid = l + r >> 1;
    if (can(mid)) {
      r = mid;
    } else {
      l = mid + 1;
    }
  }
  printf("%d\n", m - r + 1);
  for (int i = r; i <= m; i++) {
    printf("%d ", s[i].second);
  }
}
