#include <bits/stdc++.h>
const int Inf = 2 * 1000 * 1000 * 1000;
long long LINF = (long long)4e18;
using namespace std;
long double getans(long long a, long long b) {
  long double p = 2 * (a + b);
  long double s = a * b;
  return p * p / s;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    map<long long, long long> cnt;
    for (int i = 0; i < n; i++) {
      int x;
      cin >> x;
      cnt[x]++;
    }
    vector<pair<long long, long long>> a;
    for (auto &x : cnt) {
      if (x.second < 2) continue;
      a.emplace_back(x.first, 2);
      if (x.second >= 4) {
        a.emplace_back(x.first, 2);
      }
    }
    long double ans = 4e18;
    vector<long long> tmp;
    for (int i = 0; i + 1 < (int)a.size(); i++) {
      long long v1 = a[i].first;
      long long v2 = a[i + 1].first;
      long double cur = getans(v1, v2);
      if (cur < ans) {
        ans = cur;
        tmp = {v1, v1, v2, v2};
      }
    }
    for (auto &x : tmp) cout << x << ' ';
    cout << '\n';
  }
  return 0;
}
