#include <bits/stdc++.h>
using namespace std;
void require(bool cond, const string& message = "Runtime error") {
  if (!cond) {
    cerr << message << endl;
    assert(false);
  }
}
void readData() {}
struct Node {
  int v, m, id;
};
bool operator<(const Node& a, const Node& b) {
  if (a.m != b.m) return a.m < b.m;
  return a.v < b.v;
}
const int NMAX = 100006;
int ans[NMAX];
long long h;
bool can(const vector<Node>& a, long double t, int k) {
  int j = 0;
  for (int i = k; i > 0; --i) {
    while (j < a.size() && i * h > t * a[j].v) ++j;
    if (j == a.size()) return false;
    ans[i - 1] = a[j].id;
    ++j;
  }
  return true;
}
void solve() {
  int n, k;
  cin >> n >> k >> h;
  vector<Node> a(n);
  for (int i = 0; i < int(n); ++i) {
    cin >> a[i].m;
    a[i].id = i;
  }
  for (int i = 0; i < int(n); ++i) {
    cin >> a[i].v;
  }
  sort(a.begin(), a.end());
  reverse(a.begin(), a.end());
  long double l = 0, r = 1e10;
  for (int it = 0; it < int(100); ++it) {
    long double m = (l + r) / 2;
    if (can(a, m, k)) {
      r = m;
    } else {
      l = m;
    }
  }
  assert(can(a, r, k));
  for (int i = 0; i < int(k); ++i) {
    if (i) cout << " ";
    cout << ans[i] + 1;
  }
  cout << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  readData();
  solve();
  return 0;
}
