#include <bits/stdc++.h>
using namespace std;
int t, x, n, fi, se;
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  cin >> t;
  while (t--) {
    int vis[10002] = {};
    deque<int> q;
    long double mini = LONG_LONG_MAX;
    cin >> n;
    for (int u = 0; u < n; u++) {
      cin >> x;
      vis[x]++;
      if (vis[x] == 2) q.push_back(x), vis[x] = 0;
    }
    sort(q.begin(), q.end());
    for (int i = 0; i < q.size() - 1; i++) {
      long double p = ((q[i] + q[i + 1]) * 2.0), p2 = p * p;
      long double a = q[i] * q[i + 1];
      if ((p2 * 1.0 / a) < mini) {
        mini = p2 * 1.0 / a;
        fi = q[i], se = q[i + 1];
      }
    }
    cout << fi << " " << se << " " << fi << " " << se << endl;
  }
  return 0;
}
