#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops")
#pragma GCC target("abm,fma,mmx,avx,popcnt,avx2,sse,sse2,sse3")
using namespace std;
unsigned Seeyouagain() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; ++i) cin >> a[i];
  sort(a.begin(), a.end());
  vector<long long> F;
  for (long long i = 0; i + 1 < n; ++i) {
    if (a[i] == a[i + 1]) F.push_back(a[i++]);
  }
  pair<long long, long long> out = {0, 0};
  long double z = 1000000000.0;
  for (long long i = 0; i + 1 < (long long)F.size(); ++i) {
    long double x = (long double)F[i] / (long double)F[i + 1];
    long double y = (long double)F[i + 1] / (long double)F[i];
    if (z > (x + y)) out = {F[i], F[i + 1]}, z = (x + y);
  }
  cout << out.first << " " << out.first << " " << out.second << " "
       << out.second;
  return 0;
}
signed main() {
  ios_base::sync_with_stdio(!cin.tie(nullptr));
  long long testc = 1;
  cin >> testc;
  while (testc--) {
    Seeyouagain();
    cout << "\n";
  }
  return 0;
}
