#include <bits/stdc++.h>
int faster_in() {
  int r = 0, c;
  for (c = getchar(); c <= 32; c = getchar())
    ;
  if (c == '-') return -faster_in();
  for (; c > 32; r = (r << 1) + (r << 3) + c - '0', c = getchar())
    ;
  return r;
}
using namespace std;
const int INF = 1234567890;
struct st {
  int m, v, id;
};
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  long long n, k, h;
  cin >> n >> k >> h;
  st a[n];
  for (int i = (int)0, o_o = n; i < (int)o_o; ++i) {
    cin >> a[i].m;
  }
  for (int i = (int)0, o_o = n; i < (int)o_o; ++i) {
    cin >> a[i].v;
    a[i].id = i + 1;
  }
  sort(a, a + n,
       [](st a, st b) { return make_pair(a.m, a.v) < make_pair(b.m, b.v); });
  vector<int> ans;
  long double lo = 1e-14, hi = 1e14;
  long double eps = 1e-14;
  for (int ite = (int)0, o_o = 200; ite < (int)o_o; ++ite) {
    long double mid = (lo + hi) / 2.0;
    vector<int> v;
    long double cur = h;
    for (int i = (int)0, o_o = n; i < (int)o_o; ++i) {
      if (v.size() >= k) break;
      if (mid * a[i].v >= cur + eps) {
        cur += h;
        v.push_back(a[i].id);
      }
    }
    if (v.size() == k) {
      ans = v;
      hi = mid - 1;
    } else
      lo = mid + 1;
  }
  for (int x : ans) {
    cout << x << " ";
  }
  cout << '\n';
  return 0;
}
