#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 1, INF = 1e7 + 1;
int b[N], c[N], n, m, k, e[INF], d[N], last;
pair<int, int> a[N];
vector<int> g;
bool check(int x) {
  if (last > x) {
    for (int i = m - x; i > m - last; --i) {
      --d[e[a[i].first]];
    }
  } else {
    for (int i = m - last; i > m - x; --i) {
      ++d[e[a[i].first]];
    }
  }
  int cnt = 0;
  for (int i = 0; i < n + m; ++i) {
    for (int j = 0; j < d[i]; ++j) c[++cnt] = g[i];
  }
  for (int i = 1, l = 0; i <= n + x; i += k, ++l) {
    if (c[i] < l) return 0;
  }
  return 1;
}
int bs(int l, int r) {
  while (l < r) {
    int mid = (l + r + 1) / 2;
    if (!check(mid))
      r = mid - 1;
    else
      l = mid;
    last = mid;
  }
  return l;
}
int main() {
  cin >> n >> m >> k;
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &b[i]);
    g.push_back(b[i]);
  }
  for (int i = 1; i <= m; ++i) {
    scanf("%d", &a[i].first);
    a[i].second = i;
    g.push_back(a[i].first);
  }
  sort(g.begin(), g.end());
  for (int i = 0; i < n + m; ++i) {
    e[g[i]] = i;
  }
  for (int i = 1; i <= n; ++i) {
    ++d[e[b[i]]];
  }
  if (!check(0)) {
    cout << -1;
    return 0;
  }
  sort(a + 1, a + m + 1);
  int ans = bs(0, m);
  cout << ans << endl;
  for (int i = m; i > m - ans; --i) printf("%d ", a[i].second);
  return 0;
}
