#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5, inf = 1e18 + 7;
long long n, k;
long long h;
long long Arr[MAXN];
long double eps = 1e-5;
pair<pair<long long, long long>, long long> v[MAXN];
vector<long long> ans;
bool can(long double t) {
  for (int i = 0; i < n; i++) Arr[i] = (t * v[i].first.second) / h;
  int f = k;
  for (int i = n - 1; i > -1; i--) {
    if (Arr[i] >= f) f--;
    if (!f) break;
  }
  return !f;
}
int main() {
  cin >> n >> k >> h;
  for (int i = 0; i < n; i++) cin >> v[i].first.first;
  for (int i = 0; i < n; i++) {
    cin >> v[i].first.second;
    v[i].second = i + 1;
  }
  sort(v, v + n);
  long double s = 0, e = 1e9 + 7;
  for (int i = 0; i < 100; i++) {
    long double m = (e + s) / 2;
    if (can(m))
      e = m;
    else
      s = m;
  }
  for (int i = 0; i < n; i++) Arr[i] = (e * v[i].first.second) / h;
  int f = k;
  for (int i = n - 1; i > -1; i--) {
    if (Arr[i] >= f) {
      ans.push_back(v[i].second);
      f--;
    }
    if (!f) break;
  }
  for (int i = k - 1; i > -1; i--) cout << ans[i] << " ";
  return 0;
}
