#include <bits/stdc++.h>
using namespace std;
double H[100500];
int n, k;
int tmp[100500];
int ans[100500];
pair<pair<int, int>, int> a[100500];
int main() {
  scanf("%d%d%lf", &n, &k, &H[0]);
  for (int i = 0; i < ((int)(100500 - 1)); ++i) H[i + 1] = H[i] + H[0];
  for (int i = 0; i < ((int)(n)); ++i) scanf("%d", &a[i].first.first);
  for (int i = 0; i < ((int)(n)); ++i) scanf("%d", &a[i].first.second);
  for (int i = 0; i < ((int)(n)); ++i) a[i].second = i;
  sort(a, a + n);
  double low = 0, high = H[100500 - 1] * 2;
  for (int i = 0; i < ((int)(100)); ++i) {
    double mid = (low + high) / 2.0;
    int now = k - 1;
    for (int j = n - 1; 0 <= j && 0 <= now; j--) {
      if (H[now] <= a[j].first.second * mid) {
        tmp[now--] = a[j].second;
      }
    }
    if (now == -1) {
      high = mid;
      for (int j = 0; j < ((int)(k)); ++j) ans[j] = tmp[j];
    } else {
      low = mid;
    }
  }
  for (int i = 0; i < ((int)(k)); ++i) printf("%d ", ans[i] + 1);
  printf("\n");
}
