#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie();
  cout.tie();
  ;
  int tc;
  cin >> tc;
  while (tc--) {
    int n;
    cin >> n;
    vector<int> a(n);
    for (auto &it : a) cin >> it;
    ;
    map<int, int> mp, mp2;
    vector<int> v;
    for (int i = 0; i < n; i++) mp[a[i]]++;
    for (int i = 1; i < n; i++) {
      if (mp2[a[i]]) continue;
      if (mp[a[i]] >= 2) {
        if (mp[a[i]] >= 4) {
          v.push_back(a[i]);
          v.push_back(a[i]);
        } else {
          v.push_back(a[i]);
        }
      }
      mp2[a[i]] = 1;
    }
    sort((v).begin(), (v).end());
    long double mn = 1e18;
    int ans1, ans2;
    for (int i = 1; i < (int)v.size(); i++) {
      long double tm = v[i] / (long double)v[i - 1];
      tm += (v[i - 1] / (long double)v[i]);
      if (tm < mn) {
        mn = tm;
        ans1 = v[i];
        ans2 = v[i - 1];
      }
    }
    cout << ans1 << " " << ans1 << " " << ans2 << " " << ans2 << "\n";
  }
  return 0;
}
