#include <bits/stdc++.h>
using namespace std;
long long t, n, z, w, c, d;
int main(void) {
  cin >> t;
  map<long long, long long>::iterator it;
  while (t) {
    cin >> n;
    vector<pair<long long, long long> > o;
    map<long long, long long> p;
    for (int i = 0; i < n; i++) {
      long long a;
      scanf("%I64d", &a);
      p[a]++;
    }
    for (it = p.begin(); it != p.end(); ++it) {
      if (it->second >= 2)
        o.push_back(pair<long long, long long>(it->first, it->second));
    }
    sort(o.begin(), o.end());
    long long x = 10000000000, y = 1;
    for (int i = 0; i < o.size(); i++) {
      c = o[i].first;
      if (i > 0) {
        d = o[i - 1].first;
        if (c * d * x > 4 * (c + d) * (c + d) * y) {
          x = 4 * (c + d) * (c + d);
          y = c * d;
          z = c;
          w = d;
        }
      }
      if (o[i].second >= 4) {
        if (c * c * x > 16 * c * c * y) {
          x = 16 * c * c;
          y = c * c;
          z = c;
          w = c;
        }
      }
    }
    printf("%I64d %I64d %I64d %I64d\n", z, z, w, w);
    t--;
  }
}
