#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:67108864")
using namespace std;
const long double eps = 1e-10;
const int N = 100007;
int n, k, h;
struct man {
  int v, m, ind;
  bool operator<(const man &o) const {
    return m < o.m || (m == o.m && v < o.v);
  }
};
vector<man> a;
vector<int> v;
bool ok(long double t) {
  vector<int> dp(n);
  if (v[0] * t > h - eps) {
    dp[0] = 1;
  } else {
    dp[0] = 0;
  }
  for (int i = 1; i < n; ++i) {
    dp[i] = dp[i - 1];
    if (dp[i] != k && v[i] * t > (dp[i - 1] + 1) * h - eps) {
      ++dp[i];
    }
  }
  return dp[n - 1] == k;
}
int main() {
  scanf("%d%d%d", &n, &k, &h);
  a.resize(n);
  v.resize(n);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &a[i].m);
  }
  for (int i = 0; i < n; ++i) {
    scanf("%d", &a[i].v);
    a[i].ind = i + 1;
  }
  sort((a).begin(), (a).end());
  for (int i = 0; i < n; ++i) {
    v[i] = a[i].v;
  }
  long double l = 0.0;
  long double r = 1e10;
  for (int iter = 0; iter < 300; ++iter) {
    long double m = (l + r) / 2.0;
    if (ok(m)) {
      r = m;
    } else {
      l = m;
    }
  }
  long double t = l;
  vector<int> dp(n);
  vector<int> ans;
  if (v[0] * t > h - 2 * eps) {
    ans.push_back(a[0].ind);
    dp[0] = 1;
  } else {
    dp[0] = 0;
  }
  for (int i = 1; i < n; ++i) {
    dp[i] = dp[i - 1];
    if (dp[i] != k && v[i] * t > (dp[i - 1] + 1) * h - 2 * eps) {
      ans.push_back(a[i].ind);
      ++dp[i];
    }
  }
  assert((int)(ans).size() == k);
  for (int it : ans) {
    printf("%d ", it);
  }
  puts("");
  return 0;
}
