#include <bits/stdc++.h>
using namespace std;
bool can(vector<pair<int, int>> v2, vector<int> v1, int num, int k) {
  int day = 0, count = 0;
  int n = v1.size();
  int m = v2.size();
  int j = m - num;
  int i = 0;
  while (j < m || i < n) {
    if (count < k) {
      if (i < n && j < m) {
        if (v1[i] <= v2[j].first) {
          if (v1[i] >= day) {
            count++;
            i++;
          } else
            return false;
        } else {
          if (v2[j].first >= day) {
            count++;
            j++;
          } else
            return false;
        }
      } else if (i < n) {
        if (v1[i] >= day) {
          count++;
          i++;
        } else
          return false;
      } else if (j < m) {
        if (v2[j].first >= day) {
          count++;
          j++;
        } else
          return false;
      }
    }
    if (count == k) {
      count = 0;
      day++;
    }
  }
  return true;
}
void testCase() {
  int n, m, k;
  cin >> n >> m >> k;
  vector<int> fridge(n);
  vector<pair<int, int>> market(m);
  for (int i = 0; i < n; ++i) cin >> fridge[i];
  for (int i = 0; i < m; ++i) {
    cin >> market[i].first;
    market[i].second = i + 1;
  }
  sort(market.begin(), market.end());
  sort(fridge.begin(), fridge.end());
  int ans = -1, l = 0, r = m;
  while (r >= l) {
    int mid = l + (r - l) / 2;
    if (can(market, fridge, mid, k)) {
      l = mid + 1;
      ans = max(ans, mid);
    } else
      r = mid - 1;
  }
  if (ans != -1) {
    cout << ans << '\n';
    for (int i = m - ans; i < m; i++) {
      cout << market[i].second << ' ';
    }
  } else
    cout << ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  testCase();
  return 0;
}
