#include <bits/stdc++.h>
using namespace std;
map<long long, long long> M;
set<long long> S;
vector<long long> V, V1;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t, a, b;
  cin >> t;
  while (t--) {
    M.clear();
    V.clear();
    V1.clear();
    long long n, i, num;
    cin >> n;
    for (i = 0; i < n; i++) {
      cin >> num;
      M[num]++;
      if (M[num] == 2) V.push_back(num);
      if (M[num] == 4) V1.push_back(num);
    }
    sort(V.begin(), V.end());
    double ans = 0;
    double minans = 1e18;
    for (i = 0; i < V.size() - 1; i++) {
      double ans =
          (double)V[i + 1] / (double)V[i] + (double)V[i] / (double)V[i + 1];
      if (ans < minans) {
        minans = ans;
        a = V[i + 1];
        b = V[i];
      }
    }
    if (V1.size() > 0 && (2 < minans)) {
      cout << V1[0] << " " << V1[0] << " " << V1[0] << " " << V1[0] << endl;
    } else
      cout << a << " " << a << " " << b << " " << b << endl;
  }
  return 0;
}
