#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int a[N];
map<int, int> mp;
double calc(double a, double b) { return 4 * (a + b) * (a + b) / (a * b); }
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int T;
  cin >> T;
  while (T--) {
    mp.clear();
    int n;
    cin >> n;
    for (int i = 0, x; i < n; i++) {
      cin >> x;
      mp[x]++;
    }
    vector<int> ans;
    double mn = 1e18;
    for (auto it = mp.begin(); it != mp.end();) {
      auto nt = it;
      if (it->second < 2) {
        nt = next(it);
        mp.erase(it);
        it = nt;
      } else
        it++;
    }
    for (auto it = mp.begin(); it != mp.end(); it++) {
      auto nt = next(it);
      if (it->second >= 4) {
        int c = 4;
        ans.clear();
        while (c--) ans.push_back(it->first);
        break;
      }
      if (nt != mp.end() && (it->second >= 2 && nt->second >= 2)) {
        double tmp = calc(it->first, nt->first);
        if (tmp < mn) {
          mn = tmp;
          ans.clear();
          ans.push_back(it->first);
          ans.push_back(it->first);
          ans.push_back(nt->first);
          ans.push_back(nt->first);
        }
      }
    }
    for (int i = 0; i < 4; i++) {
      cout << ans[i] << " \n"[i == 3];
    }
  }
  return 0;
}
