#include <bits/stdc++.h>
using namespace std;
long long int T, N, l;
map<int, int> cnt;
double comp(long long int lhs, long long int rhs) {
  return (double)(lhs + rhs) * (lhs + rhs) / (lhs * rhs);
}
int main(int argc, char const *argv[]) {
  ios::sync_with_stdio(false);
  cin >> T;
  for (long long int i = (0); i < (long long int)(T); ++i) {
    cnt.clear();
    cin >> N;
    for (long long int i = (0); i < (long long int)(N); ++i) {
      cin >> l;
      ++cnt[l];
    }
    long long int takeS = 0, takeL = 0, dist = (1LL << 62LL), last = -1;
    double mi = (double)(1LL << 62LL);
    for (auto e : cnt) {
      if (e.second < 2) continue;
      if (last == -1) {
        last = e.first;
        if (e.second >= 4) {
          takeS = takeL = e.first;
          mi = comp(e.first, e.first);
        }
        continue;
      }
      if (comp(e.first, last) < mi) {
        takeS = last;
        takeL = e.first;
        mi = comp(e.first, last);
      }
      if (e.second >= 4 && comp(e.first, e.first) < mi) {
        takeS = takeL = e.first;
        mi = comp(e.first, e.first);
      }
      last = e.first;
    }
    cout << takeS << " " << takeS << " " << takeL << " " << takeL << endl;
  }
  return 0;
}
