#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    map<int, int> mp;
    for (int i = 0; i < n; i++) {
      int x;
      cin >> x;
      mp[x]++;
    }
    vector<int> v;
    for (auto it : mp) {
      if (it.second >= 2) v.push_back(it.first);
      if (it.second >= 4) v.push_back(it.first);
    }
    int a = 1;
    int b = 20000;
    for (int i = 0; i < int(v.size()) - 1; i++) {
      if ((v[i + 1] * a) < (v[i] * b)) {
        a = v[i];
        b = v[i + 1];
      }
    }
    cout << a << ' ' << a << ' ' << b << ' ' << b << '\n';
  }
}
