#include <bits/stdc++.h>
using namespace std;
const long long int N = 1e6 + 2, inf = 1e9 + 7;
void _run();
void no() { cout << ":(\n", exit(0); }
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  _run();
  return 0;
}
void _run() {
  int tc;
  cin >> tc;
  while (tc--) {
    map<int, int> M;
    int n;
    cin >> n;
    for (int i = 1; i <= n; i++) {
      int x;
      cin >> x;
      M[x]++;
    }
    vector<pair<int, int> > vc;
    for (auto x : M) {
      if (x.second > 1) vc.push_back(make_pair(x.first, x.second));
    }
    double mn = inf * inf;
    int a = 0, b = 0;
    for (int i = 0; i < vc.size(); i++) {
      if (vc[i].second > 3) {
        double x = (4 * vc[i].first);
        x *= x;
        double y = vc[i].first * vc[i].first;
        if (mn > x / y) mn = x / y, a = vc[i].first, b = vc[i].first;
      }
      if (i + 1 < vc.size()) {
        double x = 2 * vc[i].first + 2 * vc[i + 1].first;
        x *= x;
        double y = vc[i].first * vc[i + 1].first;
        if (mn > x / y) mn = x / y, a = vc[i].first, b = vc[i + 1].first;
      }
    }
    cout << a << " " << a << " " << b << " " << b << "\n";
  }
}
