#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int tt, n;
  tt = 1;
  cin >> tt;
  while (tt--) {
    cin >> n;
    long long int a[n];
    vector<long long int> v;
    map<long long int, long long int> mp;
    for (int i = 0; i < n; i++) cin >> a[i], mp[a[i]]++;
    for (auto c : mp) {
      if (c.second >= 2) v.push_back(c.first);
      if (c.second >= 4) v.push_back(c.first);
    }
    long double mn = INT_MAX;
    long long int p;
    for (int i = 1; i < v.size(); i++) {
      long double pp = 2 * (v[i - 1] + v[i]);
      pp *= pp;
      long double q = v[i - 1] * v[i];
      long double r = pp / q;
      if (r < mn) {
        mn = r;
        p = i;
      }
    }
    cout << v[p - 1] << " " << v[p - 1] << " " << v[p] << " " << v[p] << ("\n");
  }
  return 0;
}
