#include <bits/stdc++.h>
const long long maxn = 1e6 + 1e2;
long long val[maxn];
std::map<long long, long long> m, ss;
bool cmpscore(std::vector<long long> a, std::vector<long long> b) {
  if (a[0] == -1) {
    return true;
  }
  long long p = 2 * (a[0] + a[1]);
  long long s = a[0] * a[1];
  long long p2 = 2 * (b[0] + b[1]);
  long long s2 = b[0] * b[1];
  if (p * p * s2 >= p2 * p2 * s) {
    return true;
  }
  return false;
}
int main() {
  std::ios::sync_with_stdio(false);
  long long t;
  std::cin >> t;
  for (long long test = 0; test < t; test++) {
    long long n;
    std::cin >> n;
    m.clear();
    ss.clear();
    for (long long i = 0; i < n; i++) {
      std::cin >> val[i];
      ss[val[i]]++;
      if (ss[val[i]] >= 2) {
        m[val[i]] = ss[val[i]];
      }
    }
    std::vector<long long> res = {-1, -1, -1, -1};
    for (auto ite = m.begin(); ite != m.end(); ite++) {
      if (ite != m.begin()) {
        auto sec = ite;
        sec--;
        if (sec->second >= 2 and ite->second >= 2 and
            cmpscore(res, std::vector<long long>{ite->first, sec->first})) {
          res = {ite->first, sec->first};
        }
      }
      if (ite->second >= 4) {
        if (cmpscore(res, std::vector<long long>{ite->first, ite->first})) {
          res = {ite->first, ite->first};
        }
      }
    }
    std::cout << res[0] << ' ' << res[0] << ' ' << res[1] << ' ' << res[1]
              << '\n';
  }
}
