#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
using ll = long long;
using ld = long double;
using uint = unsigned int;
using ull = unsigned long long;
using pil = pair<int, ll>;
using pii = pair<int, int>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
const int M = 998244353, N = 1e6 + 60, inf = INT_MAX;
int n, a[N], w[10005], cnt[10005];
ld ans = inf + 0.0;
void solve() {
  memset(w, 0, sizeof(w));
  memset(cnt, 0, sizeof(cnt));
  cin >> n;
  vector<int> b;
  ans = inf + 0.0;
  int mx = 0;
  for (int i = 0; i < int(n); i++) {
    cin >> a[i];
    cnt[a[i]]++;
    if (cnt[mx] < cnt[a[i]]) mx = a[i];
  }
  if (cnt[mx] > 3) {
    cout << mx << " " << mx << " " << mx << " " << mx << "\n";
    return;
  }
  for (int i = 0; i < int(n); i++) {
    if (cnt[a[i]] > 1 && !w[a[i]]) {
      b.push_back(a[i]);
      w[a[i]] = 1;
    }
  }
  sort((b).begin(), (b).end());
  int x, y, z, t;
  for (int i = 0; i < int((int)b.size() - 1); i++) {
    if (ans == inf + 0.0) {
      x = y = b[i];
      z = t = b[i + 1];
      ans = ((2 * (x + z)) * (2 * (x + z)) / (1.0 * x * z));
    } else {
      ld tt = ((2 * (b[i] + b[i + 1])) * (2 * (b[i] + b[i + 1])) /
               (1.0 * b[i] * b[i + 1]));
      if (ans > tt) {
        ans = tt;
        x = y = b[i];
        z = t = b[i + 1];
      }
    }
  }
  cout << x << " " << y << " " << z << " " << t << "\n";
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int T = 1;
  cin >> T;
  while (T--) {
    solve();
  }
}
