#include <bits/stdc++.h>
using namespace std;
double calc(int a, int b) {
  int nume = 4 * (a * a + b * b + 2 * a * b);
  int demo = a * b;
  return (double)nume / demo;
}
void solve() {
  int n;
  cin >> n;
  vector<int> arr;
  map<int, int> freq;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    freq[x]++;
  }
  for (auto it : freq) {
    if (it.second >= 4) {
      arr.push_back(it.first);
      arr.push_back(it.first);
    } else if (it.second >= 2 && it.second < 4) {
      arr.push_back(it.first);
    }
  }
  double minm = 1e9 + 7.0;
  pair<int, int> ans = {-1, -1};
  for (int i = 1; i < arr.size(); i++) {
    double temp = calc(arr[i], arr[i - 1]);
    if (temp < minm) {
      minm = temp;
      ans = {arr[i], arr[i - 1]};
    }
  }
  cout << ans.first << " " << ans.first << " " << ans.second << " "
       << ans.second << endl;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int T;
  T = 1;
  cin >> T;
  while (T--) {
    solve();
  }
  return 0;
}
