#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long arr[n];
    map<long long, long long> mp;
    for (long long i = 0; i < n; i++) {
      cin >> arr[i];
      mp[arr[i]]++;
    }
    vector<long long> v;
    map<long long, long long>::iterator it;
    for (it = mp.begin(); it != mp.end(); it++) {
      long long x = (*it).second, y = (*it).first;
      if (x >= 4) v.push_back(y);
      if (x >= 2) v.push_back(y);
    }
    sort(v.begin(), v.end());
    long long anx = 0, any = 0;
    double mx = 1000000000000000;
    for (long long i = 1; i < v.size(); i++) {
      double x =
          (double)(v[i] * v[i] + v[i - 1] * v[i - 1]) / (v[i] * v[i - 1]);
      if (mx >= x) {
        mx = x;
        anx = v[i - 1], any = v[i];
      }
    }
    cout << anx << " " << anx << " " << any << " " << any << endl;
  }
}
