#include <bits/stdc++.h>
using namespace std;
int n, m, h, id[120000], use[120000], w[120000], v[120000], i;
long double l, r, mid;
bool cmp(const int &a, const int &b) {
  return w[a] < w[b] || w[a] == w[b] && v[a] < v[b];
}
bool check(long double mid) {
  int i, i_, s = 1;
  for (i_ = 1; i_ <= n; ++i_) {
    i = id[i_];
    if (mid * v[i] / h >= s) {
      use[s] = i;
      s++;
    }
  }
  return s - 1 >= m;
}
int main() {
  scanf("%d%d%d", &n, &m, &h);
  for (i = 1; i <= n; ++i) scanf("%d", &w[i]), id[i] = i;
  for (i = 1; i <= n; ++i) scanf("%d", &v[i]);
  sort(id + 1, id + n + 1, cmp);
  l = 0;
  r = 1e9 + 1;
  for (int t = 0; t <= 200; ++t) {
    mid = (l + r) / 2;
    if (check(mid))
      r = mid;
    else
      l = mid;
  }
  check(r);
  for (i = 1; i <= m; ++i) printf("%d ", use[i]);
}
