#include <bits/stdc++.h>
using namespace std;
const int maxn = 100010;
struct Node {
  int m, v, id;
  bool operator<(const Node& P) const {
    if (m != P.m) return m < P.m;
    return v < P.v;
  }
} A[maxn];
int n, k, h, tmp[maxn], ans[maxn];
inline bool check(double M) {
  int cnt = k;
  for (int i = n; i; i--) {
    if (cnt <= A[i].v * M) {
      tmp[cnt--] = A[i].id;
      if (!cnt) {
        memcpy(ans, tmp, sizeof(int) * (k + 1));
        return 1;
      }
    }
  }
  return 0;
}
int main() {
  while (~scanf("%d%d%d", &n, &k, &h)) {
    for (int i = 1; i <= n; i++) A[i].id = i;
    for (int i = 1; i <= n; i++) scanf("%d", &A[i].m);
    for (int i = 1; i <= n; i++) scanf("%d", &A[i].v);
    sort(A + 1, A + 1 + n);
    double l = 1e-9, r = 1e5;
    for (int i = 0; i < 100; i++) {
      double mid = (l + r) / 2;
      if (check(mid))
        r = mid;
      else
        l = mid;
    }
    for (int i = 1; i <= k; i++) printf("%d%c", ans[i], i < k ? ' ' : '\n');
  }
  return 0;
}
