#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 100;
int x[N], z[2 * N], n, m, k;
struct node {
  int v, i;
} y[N];
bool com(node k1, node k2) { return k1.v < k2.v; }
bool f(int w) {
  int o = 0, i = 1, j = w, l;
  while (i <= n && j <= m) {
    if (x[i] <= y[j].v)
      z[++o] = x[i], i++;
    else
      z[++o] = y[j].v, j++;
  }
  while (i <= n) z[++o] = x[i], i++;
  while (j <= m) z[++o] = y[j].v, j++;
  for (i = 1, l = 0; i <= o; i += k, l++)
    for (j = i; j <= min(o, i + k - 1); j++)
      if (z[j] < l) return false;
  return true;
}
int main() {
  int i, l, r, mid;
  scanf("%d%d%d", &n, &m, &k);
  for (i = 1; i <= n; i++) scanf("%d", &x[i]);
  for (i = 1; i <= m; i++) scanf("%d", &y[i].v), y[i].i = i;
  sort(x + 1, x + n + 1);
  sort(y + 1, y + m + 1, com);
  if (!f(m + 1)) {
    puts("-1");
    return 0;
  }
  l = 0;
  r = m + 1;
  while (l + 1 < r) {
    mid = (l + r) / 2;
    if (f(mid))
      r = mid;
    else
      l = mid;
  }
  printf("%d\n", m - r + 1);
  for (i = r; i <= m; i++) printf("%d ", y[i].i);
}
