#include <bits/stdc++.h>
using namespace std;
template <class T>
void checkmin(T &t, T x) {
  if (x < t) t = x;
}
template <class T>
void checkmax(T &t, T x) {
  if (x > t) t = x;
}
const int N = 105555;
int n, m, h;
int w[N];
int v[N];
long long max_h[N];
int ind[N];
vector<int> vec;
bool cmp(int i, int j) {
  if (w[i] != w[j]) return w[i] < w[j];
  return v[i] < v[j];
}
int main() {
  scanf("%d%d%d", &n, &m, &h);
  for (int i = 1; i <= n; i++) scanf("%d", &w[i]);
  for (int i = 1; i <= n; i++) scanf("%d", &v[i]);
  for (int i = 1; i <= n; i++) ind[i] = i;
  sort(ind + 1, ind + n + 1, cmp);
  long double l = 0, r = 1e9 + 5;
  for (int k = 0; k < 200; k++) {
    long double mid = (l + r) / 2;
    for (int i = 1; i <= n; i++) {
      max_h[i] = (v[ind[i]] * mid) / h;
    }
    bool ok = true;
    int j = 1;
    for (int i = 1; i <= m; i++) {
      while (j <= n && max_h[j] < i) j++;
      if (j <= n) {
        j++;
      } else {
        ok = false;
        break;
      }
    }
    if (ok) {
      r = mid;
      vec.clear();
      j = 1;
      for (int i = 1; i <= m; i++) {
        while (j <= n && max_h[j] < i) j++;
        if (j <= n) {
          vec.push_back(j);
          j++;
        }
      }
    } else
      l = mid;
  }
  for (int i = 0; i < vec.size(); i++) printf("%d ", ind[vec[i]]);
}
