#include <bits/stdc++.h>
using namespace std;
int squ(vector<long long> &v) {
  for (int i = 0; i + 3 < v.size(); i++) {
    if (v[i] == v[i + 1] && v[i] == v[i + 2] && v[i] == v[i + 3]) return v[i];
  }
  return -1;
}
vector<long long> pa(vector<long long> &v) {
  vector<long long> q;
  for (int i = 0; i + 1 < v.size(); i++) {
    if (i == 0 || v[i - 1] != v[i]) {
      if (v[i] == v[i + 1]) q.push_back(v[i]);
    }
  }
  return q;
}
bool checkv(pair<long long, long long> a, pair<long long, long long> b) {
  if ((a.first + a.second) * (a.first + a.second) * b.first * b.second >
      (b.first + b.second) * (b.first + b.second) * a.first * a.second)
    return true;
  return false;
}
int main() {
  ios_base::sync_with_stdio(0);
  int T;
  cin >> T;
  while (T--) {
    long long n;
    cin >> n;
    vector<long long> v;
    for (int i = 0; i < n; i++) {
      long long a;
      cin >> a;
      v.push_back(a);
    }
    sort(v.begin(), v.end());
    long long res = squ(v);
    if (res > 0) {
      for (int i = 0; i < 4; i++) cout << res << " ";
      cout << "\n";
      continue;
    }
    vector<long long> u = pa(v);
    pair<long long, long long> cur = {u[0], u[1]};
    for (int i = 0; i + 1 < u.size(); i++) {
      if (checkv(cur, {u[i], u[i + 1]})) {
        cur = {u[i], u[i + 1]};
      }
    }
    cout << cur.first << " " << cur.first << " " << cur.second << " "
         << cur.second << "\n";
  }
  return 0;
}
