#include <bits/stdc++.h>
using namespace std;
struct triple {
  long long a;
  long long b;
  long long c;
};
vector<triple> lemmings;
bool compa(triple a, triple b) {
  if (a.a != b.a) return a.a < b.a;
  if (a.b != b.b) return a.b < b.b;
  return a.c < b.c;
}
int main() {
  long long n, k, h;
  cin >> n >> k >> h;
  lemmings.resize(n);
  for (int i = 0; i < (n); ++i) {
    cin >> lemmings[i].a;
    lemmings[i].c = i;
  }
  for (int i = 0; i < (n); ++i) cin >> lemmings[i].b;
  sort(lemmings.begin(), lemmings.end(), compa);
  double top = 20000000000.0, bot = 0.0, mid = (top + bot) / 2;
  for (int i = 0; i < (100); ++i) {
    double t = 1;
    for (int i = 0; i < (n); ++i) {
      double gas = lemmings[i].b;
      gas *= mid;
      if (t < gas) t += 1.0;
    }
    if (t + 0.5 > k + 1)
      top = mid;
    else
      bot = mid;
    mid = (top + bot) / 2;
  }
  int asd[k];
  double t = 1;
  int wer = 0;
  for (int i = 0; i < (n); ++i) {
    double gas = lemmings[i].b;
    gas *= mid;
    if (t < gas + 0.0000000001 && wer < k) {
      t += 1.0;
      asd[wer] = lemmings[i].c;
      wer++;
    }
  }
  for (int i = 0; i < (k - 1); ++i) cout << asd[i] + 1 << " ";
  cout << asd[k - 1] + 1 << endl;
}
