#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t > 0) {
    vector<long long> l;
    int n;
    map<long long, long long> mp;
    cin >> n;
    long long int a[n];
    for (int i = 0; i < n; i++) {
      cin >> a[i], mp[a[i]]++;
    }
    long long p;
    int f = 0;
    for (int i = 0; i < n; i++) {
      if (mp[a[i]] >= 4) {
        p = a[i];
        f = 1;
        break;
      }
      if (mp[a[i]] == 2) {
        l.push_back(a[i]);
        mp[a[i]]--;
      }
      if (mp[a[i]] == 3) mp[a[i]]--;
    }
    if (f == 1) {
      cout << p << " " << p << " " << p << " " << p << "\n";
    } else {
      sort(l.begin(), l.end());
      long long low, high;
      low = l[0], high = l[1];
      for (int i = 2; i < l.size(); i++) {
        if (l[i] * low < high * l[i - 1]) {
          low = l[i - 1];
          high = l[i];
        }
      }
      cout << low << " " << low << " " << high << " " << high << "\n";
    }
    t--;
  }
}
