#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  for (int k = 0; k < t; k++) {
    int n;
    cin >> n;
    vector<int> a;
    map<int, int> v;
    for (int i = 0; i < n; i++) {
      int x;
      cin >> x;
      v[x]++;
    }
    for (auto i : v)
      for (int j = 0; j < 2 && i.second > 1; j++, i.second -= 2)
        a.push_back(i.first);
    int p = 1;
    for (int i = 1; i < a.size(); i++) {
      if ((long double)(a[i] + a[i - 1]) * (a[i] + a[i - 1]) /
              (long double)(a[i] * a[i - 1]) <
          (long double)(a[p] + a[p - 1]) * (a[p] + a[p - 1]) /
              (long double)(a[p] * a[p - 1]))
        p = i;
    }
    cout << a[p] << ' ' << a[p] << ' ' << a[p - 1] << ' ' << a[p - 1] << endl;
  }
  return 0;
}
