#include <bits/stdc++.h>
using namespace std;
int t;
int main() {
  ios::sync_with_stdio(false);
  cin >> t;
  while (t-- > 0) {
    int n;
    cin >> n;
    vector<int> v;
    map<int, int> mp;
    int a, b, c, d;
    for (int i = 0; i < n; i++) {
      int e;
      cin >> e;
      mp[e]++;
      if (mp[e] == 2) {
        v.push_back(e);
        mp[e] = 0;
      }
    }
    sort(v.begin(), v.end());
    double best = 0x3f3f3f3f;
    int min_x, min_y;
    for (int i = 0; i < v.size() - 1; i++) {
      a = v[i];
      b = v[i + 1];
      double new_best =
          (double)(2 * a + 2 * b) * (2 * a + 2 * b) / (double)(a * b);
      if (new_best <= best) {
        best = new_best;
        min_x = a;
        min_y = b;
      }
    }
    cout << min_x << " " << min_x << " " << min_y << " " << min_y << endl;
  }
  return 0;
}
