#include <bits/stdc++.h>
using namespace std;
void fast() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
int main() {
  fast();
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> a(n);
    map<int, int> m;
    for (int i = 0; i < n; ++i) {
      cin >> a[i];
      m[a[i]]++;
    }
    vector<int> ans;
    for (auto it = m.begin(); it != m.end(); ++it)
      if (it->second >= 4) {
        ans.push_back(it->first);
        ans.push_back(it->first);
      } else if (it->second >= 2)
        ans.push_back(it->first);
    sort(ans.begin(), ans.end());
    if (ans.size() < 2) {
      cout << ans[0] << " " << ans[0] << " " << ans[0] << " " << ans[0] << '\n';
      continue;
    }
    long double anss = (4 * (ans[0] + ans[1]) * (ans[0] + ans[1])) /
                       (long double)((ans[0] * ans[1]));
    int ansi = 0;
    for (int i = 1; i < ans.size() - 1; ++i) {
      long double temp = (4 * (ans[i] + ans[i + 1]) * (ans[i] + ans[i + 1])) /
                         (long double)((ans[i] * ans[i + 1]));
      if (temp < anss) {
        ansi = i;
        anss = temp;
      }
    }
    cout << ans[ansi] << " " << ans[ansi] << " " << ans[ansi + 1] << " "
         << ans[ansi + 1] << '\n';
  }
}
