#include <bits/stdc++.h>
using namespace std;
struct lemm {
  long m, v, id;
};
long n, k, h;
lemm l[100100];
bool cmp(lemm x, lemm y) {
  if (x.m < y.m) return 1;
  if (x.m > y.m) return 0;
  if (x.v < y.v) return 1;
  return 0;
}
void read(void) {
  cin >> n >> k >> h;
  for (long i = 0; i < n; ++i) cin >> l[i].m;
  for (long i = 0; i < n; ++i) {
    cin >> l[i].v;
    l[i].id = i + 1;
  }
  sort(l, l + n, cmp);
}
bool try_(double t) {
  long j = 1;
  for (long i = 0; i < n && j <= k; ++i)
    if (l[i].v * t >= j) ++j;
  return j > k;
}
void writeans(double t) {
  long j = 1;
  for (long i = 0; i < n && j <= k; ++i)
    if (l[i].v * t >= j) {
      cout << l[i].id << " ";
      ++j;
    }
}
void bs(void) {
  double rb = 100100, lb = 0, m;
  for (long i = 0; i < 100; ++i) {
    m = (lb + rb) / 2;
    try_(m) ? rb = m : lb = m;
  }
  writeans(rb);
}
int main() {
  read();
  bs();
  return 0;
}
