#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
int n, k, h;
int m[100000];
int v[100000];
int id[100000];
int ret[100000];
bool cmp(int i, int j) { return m[i] < m[j] || (m[i] == m[j] && v[i] < v[j]); }
bool can(double t) {
  int j = 0;
  double H = h;
  for (int i = 0, _n = (n); i < _n; ++i) {
    if (j == k) break;
    int z = id[i];
    if (H <= t * v[z]) {
      ret[j++] = z;
      H += h;
    }
  }
  return j == k;
}
void solution() {
  scanf("%d %d %d", &n, &k, &h);
  for (int i = 0, _n = (n); i < _n; ++i) scanf("%d", m + i), id[i] = i;
  for (int i = 0, _n = (n); i < _n; ++i) scanf("%d", v + i);
  sort(id, id + n, cmp);
  double l = 0, r = 2000000000, m;
  for (int it = 0, _n = (100); it < _n; ++it) {
    m = (l + r) / 2;
    if (can(m))
      r = m;
    else
      l = m;
  }
  can(r);
  for (int i = 0, _n = (k); i < _n; ++i) printf("%d ", ret[i] + 1);
  puts("");
}
int main() {
  solution();
  return 0;
}
