#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int i, j, k, l, n, a1, a2;
    cin >> n;
    int a[n];
    vector<int> v;
    for (i = 0; i < n; i++) cin >> a[i];
    sort(a, a + n);
    for (i = 0; i < n - 1; i++) {
      if (a[i] == a[i + 1]) {
        v.push_back(a[i]);
        i++;
      }
    }
    double kk = 0.0;
    for (i = 0; i < v.size() - 1; i++) {
      if (i == 0) {
        a1 = v[i], a2 = v[i + 1];
        kk = (double)a1 / a2 + (double)a2 / a1;
      } else {
        double jj = (double)v[i] / v[i + 1] + (double)v[i + 1] / v[i];
        if (jj < kk) a1 = v[i], a2 = v[i + 1], kk = jj;
      }
    }
    cout << a1 << " " << a1 << " " << a2 << " " << a2 << endl;
  }
}
