#include <bits/stdc++.h>
using namespace std;
int n, k, h;
struct Node {
  int m, v;
  int id;
  bool operator<(const Node &x) const {
    if (m != x.m) return m < x.m;
    return v < x.v;
  }
} q[100005];
bool ok(double times) {
  int i, j;
  for (j = 1, i = 0; i < n; i++) {
    if (q[i].v * times - (double)j * h >= -1e-9) j++;
    if (j > k) return true;
  }
  return false;
}
int main() {
  int i, j;
  cin >> n >> k >> h;
  for (i = 0; i < n; i++) cin >> q[i].m;
  for (i = 0; i < n; i++) {
    cin >> q[i].v;
    q[i].id = i + 1;
  }
  sort(q, q + n);
  double l, r, mid;
  l = 0, r = 1e20;
  for (int i = 0; i < 200; i++) {
    mid = (l + r) * 0.5;
    if (!ok(mid))
      l = mid;
    else
      r = mid;
  }
  j = 1;
  for (i = 0; i < n; i++) {
    if (q[i].v * r - (double)j * h >= -1e-9) {
      cout << q[i].id << " ";
      j++;
    }
    if (j > k) break;
  }
}
