#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 7;
int a[N], n, m, k, cnt, ans;
struct node {
  int d, id;
} b[N];
inline bool cmp(const struct node A, const struct node B) {
  return (A.d < B.d);
}
inline int IN() {
  char c;
  int flag = 1, k = 0;
  for (c = getchar(); c < '0' || c > '9'; c = getchar())
    if (c == '-') flag = -1;
  for (; '0' <= c && c <= '9'; c = getchar()) k = k * 10 + c - '0';
  return k * flag;
}
inline bool check(int u) {
  int l = 1, r = m - u + 1, tim = 1;
  while (l <= n || r <= m) {
    if ((l <= n && a[l] < tim) && (r <= m && b[r].d < tim)) return 0;
    if (l > n && (r <= m && b[r].d < tim)) return 0;
    if (r > m && (l <= n && a[l] < tim)) return 0;
    for (int i = 1; i <= k; ++i)
      if (l <= n && ((r > m) || (a[l] <= b[r].d && a[l] >= tim)))
        ++l;
      else if (r <= m && b[r].d >= tim)
        ++r;
    ++tim;
  }
  return 1;
}
int main() {
  n = IN();
  m = IN();
  k = IN();
  for (int i = 1; i <= n; ++i) {
    a[i] = IN(), ++a[i];
  }
  for (int i = 1; i <= m; ++i) {
    b[i].d = IN();
    ++b[i].d;
    b[i].id = i;
  }
  sort(a + 1, a + 1 + n);
  sort(b + 1, b + 1 + m, cmp);
  if (!check(0)) {
    cout << -1 << endl << endl;
    return 0;
  }
  if (!check(1)) {
    cout << 0 << endl << endl;
    return 0;
  }
  int L = 1, R = m;
  while (L + 1 < R) {
    int mid = (L + R) >> 1;
    if (check(mid))
      L = mid;
    else
      R = mid - 1;
  }
  if (check(R))
    ans = R;
  else
    ans = L;
  if (ans == L) check(L);
  cout << ans << endl;
  for (int i = 1; i <= ans; ++i) a[i] = b[m - i + 1].id;
  sort(a + 1, a + 1 + ans);
  for (int i = 1; i <= ans; ++i) cout << a[i] << " ";
  return 0;
}
