#include <bits/stdc++.h>
using namespace std;
vector<long long> v1(102400), v2(102400);
bool cp(long long a, long long b) {
  return v1[a] > v1[b] || v1[a] == v1[b] && v2[a] > v2[b];
}
int main() {
  long long tek = 100, n, k, h;
  vector<long long> p(102400), t(102400), a(102400);
  cin >> n >> k >> h;
  for (long long i = 0; i < n; i++) {
    cin >> v1[i];
    p[i] = i;
  }
  for (long long i = 0; i < n; i++) {
    cin >> v2[i];
  }
  sort(p.begin(), p.begin() + n, cp);
  for (double l = 0, r = 2e9, m; tek--;) {
    m = (l + r) * 0.5;
    long long i = k;
    for (long long j = 0; i; t[--i] = p[j++]) {
      for (; j < n && v2[p[j]] * m - i * h < -1e-9; ++j)
        ;
      if (j >= n) break;
    }
    if (i) {
      l = m;
    } else {
      r = m;
      for (i = 0; i < k; ++i) {
        a[i] = t[i];
      }
    }
  }
  for (long long i = 0; i < k; i++) {
    cout << a[i] + 1 << " ";
  }
}
