#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  scanf("%lld", &t);
  while (t--) {
    long long n;
    scanf("%lld", &n);
    long long a[n + 5];
    map<long long, long long> freq;
    vector<pair<long long, long long> > v;
    vector<long long> v1;
    for (long long i = 0; i < n; i++) scanf("%lld", &a[i]), freq[a[i]]++;
    sort(a, a + n);
    long long fl = 0, ii;
    for (long long i = 0; i < n; i++) {
      if (freq[a[i]] >= 4) {
        fl = 1;
        ii = i;
        break;
      }
    }
    if (fl) {
      cout << a[ii] << " " << a[ii] << " " << a[ii] << " " << a[ii] << endl;
      continue;
    }
    for (long long i = 1; i < n; i++) {
      if (freq[a[i]] >= 2) {
        v1.push_back(a[i]);
        freq[a[i]] = 0;
      }
    }
    long long sz = v1.size(), chk, ind;
    double mn = 1e18;
    if (sz == 1) {
      cout << v1[0] << " " << v1[0] << " " << v1[0] << " " << v1[0] << endl;
      continue;
    }
    for (long long i = 1; i < sz; i++) {
      double cal = (double)((1.0 * v1[i - 1]) / v1[i]);
      double ca = (double)((1.0 * v1[i]) / v1[i - 1]);
      double res = cal + ca;
      mn = min(mn, res);
      if (mn == res) ind = i;
    }
    cout << v1[ind - 1] << " " << v1[ind - 1] << " " << v1[ind] << " "
         << v1[ind] << endl;
  }
}
