#include <bits/stdc++.h>
using namespace std;
const int limite = 100000;
int n, k, h;
int w[limite], v[limite], indice[limite], sol[limite];
bool compara(int i1, int i2) {
  if (w[i1] < w[i2]) return true;
  if (w[i1] > w[i2]) return false;
  if (v[i1] < v[i2]) return true;
  if (v[i1] > v[i2]) return false;
  return false;
}
bool puede(long double t) {
  int isol = 0;
  for (int i = 0; i < n; i++) {
    if ((isol + 1) <= v[indice[i]] * t) sol[isol++] = indice[i] + 1;
    if (isol == k) return true;
  }
  return false;
}
int main() {
  cin >> n >> k >> h;
  for (int i = 0; i < n; i++) cin >> w[i];
  for (int i = 0; i < n; i++) cin >> v[i];
  for (int i = 0; i < n; i++) indice[i] = i;
  sort(indice, indice + n, compara);
  long double inf = 0;
  long double sup = 1000000000;
  for (int paso = 0; paso < 90; paso++) {
    long double med = (inf + sup) / 2.0;
    if (puede(med))
      sup = med;
    else
      inf = med;
  }
  puede(sup);
  for (int i = 0; i < k; i++) {
    if (i > 0) cout << " ";
    cout << sol[i];
  }
  cout << endl;
}
