#include <bits/stdc++.h>
#pragma GCC optimize("O3")
const double PI = acos(-1);
template <class A, class B>
std::ostream& operator<<(std::ostream& st, const std::pair<A, B> p) {
  st << "(" << p.first << ", " << p.second << ")";
  return st;
}
using namespace std;
const long double eps = (1.0 / (long double)999999999 - 1e-9) * 0.9;
std::vector<int> aux;
int n, K, h;
bool can(long double t, const vector<pair<std::pair<int, int>, int>>& A) {
  aux.clear();
  for (auto [p, i] : A) {
    auto [_, v] = p;
    long long big = floor(t * v + eps);
    if (big > ((int)aux.size())) {
      aux.push_back(i);
    }
    if (((int)aux.size()) == K) return true;
  }
  return false;
}
auto cmp = [](const std::pair<int, int>& a, const std::pair<int, int>& b) {
  return a.first * (long long)b.second < a.second * (long long)b.first;
};
int main() {
  scanf("%d %d %d", &n, &K, &h);
  vector<pair<std::pair<int, int>, int>> A(n);
  for (int i = 0; i < (n); i++) A[i].second = i + 1;
  for (auto& [p, _] : A) scanf("%d", &p.first);
  for (auto& [p, _] : A) scanf("%d", &p.second);
  sort(A.begin(), A.end());
  long double s = 0, e = K;
  for (int t = 0; e - s > eps && t < 85; t++) {
    long double m = s + (e - s) / 2.0;
    if (can(m, A))
      e = m;
    else
      s = m;
  }
  can(e, A);
  std::vector<int> speed(n + 1);
  for (auto [p, i] : A) speed[i] = p.second;
  std::pair<int, int> t(0, 1);
  for (int i = 0; i < (K); i++) {
    printf("%d ", aux[i]);
    t = max(t, std::pair<int, int>(i + 1, speed[aux[i]]), cmp);
  }
  puts("");
  cerr << "time is " << t << " ~ " << t.first / (double)t.second << endl;
  return 0;
}
