#include <bits/stdc++.h>
using namespace std;
long long am[10001];
vector<long long> v;
vector<long long> ans;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long x, n, i;
    cin >> n;
    v.clear();
    memset(am, 0, sizeof(am));
    for (i = 0; i < n; i++) {
      cin >> x;
      am[x]++;
      if (am[x] == 2) {
        am[x] = 0;
        v.push_back(x);
      }
    }
    sort(v.begin(), v.end());
    ans = {0, 0, 0, 0};
    long long num = 1e10, den = 1;
    for (i = 0; i < v.size(); i++) {
      long long a = v[i];
      if (i) {
        long long b = v[i - 1];
        long long nnum = (2 * a + 2 * b) * (2 * a + 2 * b), nden = a * b;
        if (nnum * den < num * nden) {
          num = nnum;
          den = nden;
          ans = {a, a, b, b};
        }
      }
      if (i + 1 < v.size()) {
        long long b = v[i + 1];
        long long nnum = (2 * a + 2 * b) * (2 * a + 2 * b), nden = a * b;
        if (nnum * den < num * nden) {
          num = nnum;
          den = nden;
          ans = {a, a, b, b};
        }
      }
    }
    for (auto x : ans) {
      cout << x << " ";
    }
    cout << "\n";
  }
}
