#include <bits/stdc++.h>
using namespace std;
int n, k, h;
int ans[100 * 1000 + 10];
pair<pair<int, int>, int> mv[100 * 1000 + 10];
bool check(long double t) {
  int now = 1, ted = 0;
  vector<int> tmp;
  for (int j = 0; j < n; j++) {
    if (t * mv[j].first.second >= now * h) {
      now++;
      ted++;
      tmp.push_back(mv[j].second);
      if (ted >= k) break;
    }
  }
  if (ted >= k) {
    for (int i = 0; i < k; i++) {
      ans[i] = tmp[i];
    }
    return true;
  } else
    return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cout.tie(0);
  cin.tie(0);
  cin >> n >> k >> h;
  for (int i = 0; i < n; i++) {
    cin >> mv[i].first.first;
    mv[i].second = i + 1;
  }
  for (int i = 0; i < n; i++) {
    cin >> mv[i].first.second;
  }
  sort(mv, mv + n);
  long double l, r, mid;
  l = 0;
  r = 1e12;
  for (int i = 0; i < 200; i++) {
    mid = (l + r) / 2;
    if (check(mid)) {
      r = mid;
    } else {
      l = mid;
    }
  }
  for (int i = 0; i < k; i++) cout << ans[i] << " ";
}
