#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10, M = 1e6 + 10, inf = 2e9 + 10, mod = 1e9 + 7;
const long long INF = 1e18 + 10;
int a[N];
struct is {
  int b, pos;
  bool operator<(const is &a) const { return b < a.b; }
} b[N];
vector<int> ans;
int main() {
  int n, m, k;
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= m; i++) scanf("%d", &b[i].b), b[i].pos = i;
  sort(a + 1, a + 1 + n);
  sort(b + 1, b + 1 + m);
  int en1 = n, en2 = m;
  for (int i = 1e7; i >= 0; i--) {
    int flag = k;
    while (flag) {
      if (en1 >= 1 && a[en1] >= i)
        en1--;
      else
        break;
      flag--;
    }
    if (en1 >= 1 && a[en1] >= i) return puts("-1");
    while (flag) {
      if (en2 >= 1 && b[en2].b >= i) {
        ans.push_back(b[en2].pos);
        en2--;
      } else
        break;
      flag--;
    }
  }
  printf("%d\n", ans.size());
  for (int i = 0; i < ans.size(); i++) printf("%d ", ans[i]);
  return 0;
}
