#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 10;
int n, m, k;
int f[N];
int s[N];
int pre[N];
long long suf[N];
vector<int> id[N];
vector<int> ans;
int idx;
unordered_map<int, int> M;
unordered_map<int, int> rev;
inline void compress() {
  vector<int> vec;
  for (int i = 1; i <= n; ++i) vec.push_back(f[i]);
  for (int i = 1; i <= m; ++i) vec.push_back(s[i]);
  sort(vec.begin(), vec.end());
  vec.erase(unique(vec.begin(), vec.end()), vec.end());
  for (auto i : vec) {
    M[i] = ++idx;
    rev[idx] = i;
  }
  for (int i = 1; i <= n; ++i) f[i] = M[f[i]];
  for (int i = 1; i <= m; ++i) s[i] = M[s[i]];
}
inline bool solve() {
  compress();
  for (int i = 1; i <= n; ++i) ++pre[f[i]];
  vector<int> S;
  for (int i = 1; i <= m; ++i) {
    id[s[i]].push_back(i);
    S.push_back(s[i]);
  }
  sort(S.begin(), S.end());
  for (int i = 1; i <= idx; ++i) {
    pre[i] += pre[i - 1];
    if (pre[i] > 1LL * (rev[i] + 1) * k) return false;
  }
  suf[idx] = 1LL * k * (rev[idx] + 1) - pre[idx];
  for (int i = idx - 1; i >= 1; --i)
    suf[i] = min(1LL * (rev[i] + 1) * k - pre[i], suf[i + 1]);
  int add = 0;
  for (int i = 0; i < S.size(); ++i) {
    int x = S[i];
    if (suf[x] - add - 1 >= 0) {
      ++add;
      ans.push_back(id[x].back());
      id[x].pop_back();
    }
  }
  return true;
}
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]);
  if (!solve())
    printf("-1\n");
  else {
    printf("%d\n", ans.size());
    for (auto i : ans) printf("%d ", i);
    printf("\n");
  }
  return 0;
}
