#include <bits/stdc++.h>
using namespace std;
long long readi() {
  long long input = 0;
  char c = ' ';
  while (c < '-') {
    c = getchar();
  }
  bool negative = false;
  if (c == '-') {
    negative = true;
    c = getchar();
  }
  while (c >= '0') {
    input = 10 * input + (c - '0');
    c = getchar();
  }
  if (negative) {
    input = -input;
  }
  return input;
}
string reads() {
  string input = "";
  char c = ' ';
  while (c <= ' ') {
    c = getchar();
  }
  while (c > ' ') {
    input += c;
    c = getchar();
  }
  return input;
}
void printi(long long output) {
  if (output == 0) {
    putchar('0');
    return;
  }
  if (output < 0) {
    putchar('-');
    output = -output;
  }
  vector<char> vout;
  while (output) {
    vout.push_back((output % 10) + '0');
    output /= 10;
  }
  for (int i = vout.size() - 1; i >= 0; i--) {
    putchar(vout[i]);
  }
  return;
}
void prints(string output) {
  for (int i = 0; i < output.length(); i++) {
    putchar(output[i]);
  }
  return;
}
int N, M, K;
int num[2000010];
int buy[2000010];
int temp[2000010];
int lo, hi;
vector<int> v[2000010];
bool check(int x) {
  for (int i = 0; i < 2000010; i++) {
    temp[i] = num[i];
  }
  for (int i = 2000010 - 1; i >= 0; i--) {
    if (x > buy[i]) {
      x -= buy[i];
      temp[i] += buy[i];
    } else {
      temp[i] += x;
      x = 0;
    }
  }
  int run = 0;
  for (int i = 0; i < 2000010; i++) {
    run += temp[i];
    if ((long long)run > (long long)K * (long long)(i + 1)) {
      return false;
    }
  }
  return true;
}
int32_t main() {
  cout << fixed << setprecision(10);
  ios_base::sync_with_stdio(false);
  if (fopen("cf767d.in", "r")) {
    freopen("cf767d.in", "r", stdin);
  }
  cin >> N >> M >> K;
  for (int i = 0; i < N; i++) {
    int x;
    cin >> x;
    x = min(x, 2000010 - 1);
    num[x]++;
  }
  for (int i = 0; i < M; i++) {
    int x;
    cin >> x;
    x = min(x, 2000010 - 1);
    buy[x]++;
    v[x].push_back(i + 1);
  }
  int lo = 0, hi = M + 1;
  if (!check(lo)) {
    cout << "-1\n";
    return 0;
  }
  while (hi - lo > 1) {
    int mid = (hi + lo) / 2;
    if (check(mid)) {
      lo = mid;
    } else {
      hi = mid;
    }
  }
  cout << lo << '\n';
  int run = lo;
  for (int i = 2000010 - 1; i >= 0; i--) {
    if (run > buy[i]) {
      for (int j = 0; j < buy[i]; j++) {
        cout << v[i][j] << ' ';
      }
      run -= buy[i];
    } else {
      for (int j = 0; j < run; j++) {
        cout << v[i][j] << ' ';
      }
      run = 0;
    }
  }
  cout << '\n';
  return 0;
}
