#include <bits/stdc++.h>
using namespace std;
long long n, k, s, ans, i, t, a[300005];
pair<long long, long long> b[300005];
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> b[i].first;
    b[i].second = i;
  }
  cin >> k;
  sort(b + 1, b + n + 1);
  for (i = 2; i <= k; i++)
    s += (b[i].first - b[i - 1].first) * (k - i + 1) * (i - 1);
  for (i = 1; i <= n; i++) a[i] = a[i - 1] + b[i].first;
  ans = s;
  t = 1;
  for (i = 1; i <= n - k; i++) {
    s += (k - 1) * (b[i].first + b[i + k].first) - 2 * (a[i + k - 1] - a[i]);
    if (s < ans) ans = s, t = i + 1;
  }
  for (i = t; i < t + k; i++) cout << b[i].second << ' ';
  return 0;
}
