#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 3;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t, i, j, n, m, l, r;
  cin >> t;
  while (t--) {
    cin >> n;
    map<int, int> mp;
    for (i = 0; i < n; i++) {
      cin >> l;
      mp[l]++;
    }
    vector<int> a;
    for (auto it = mp.begin(); it != mp.end(); it++) {
      r = it->second;
      if (r > 1 && r < 4) a.push_back(it->first);
      if (r >= 4) {
        a.push_back(it->first);
        a.push_back(it->first);
      }
    }
    sort(a.begin(), a.end());
    n = a.size();
    double x, y;
    y = 1e15;
    for (i = 1; i < n; i++) {
      x = a[i] * 1.0 / a[i - 1];
      if (x < y) {
        y = x;
        l = a[i], r = a[i - 1];
      }
    }
    cout << l << " " << l << " " << r << " " << r << "\n";
  }
  return 0;
}
