#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int test;
  cin >> test;
  while (test--) {
    cin >> n;
    map<int, int> cnt;
    for (int i = (1), _b = (n); i <= _b; i++) {
      int temp;
      cin >> temp;
      cnt[temp]++;
    }
    vector<int> listEdge;
    int bkp = 0;
    for (__typeof((cnt).begin()) it = (cnt).begin(); it != (cnt).end(); it++) {
      if ((*it).second >= 2) listEdge.push_back((*it).first);
      if ((*it).second >= 4) {
        cout << (*it).first << ' ' << (*it).first << ' ' << (*it).first << ' '
             << (*it).first << '\n';
        bkp = 1;
        break;
      }
    }
    if (bkp) continue;
    sort(listEdge.begin(), listEdge.end());
    double area = 1e18;
    int edge1, edge2;
    for (int i = 0, _n = (listEdge.size()); i < _n; i++) {
      if (i > 0) {
        int64_t P = (listEdge[i] + listEdge[i - 1]) * 2,
                S = listEdge[i] * listEdge[i - 1];
        double kq = ((P * 1.0) * (P)) / (S * 1.0);
        if (kq < area) {
          area = kq;
          edge1 = listEdge[i], edge2 = listEdge[i - 1];
        }
      }
      if (i < listEdge.size() - 1) {
        int64_t P = (listEdge[i] + listEdge[i + 1]) * 2,
                S = listEdge[i] * listEdge[i + 1];
        double kq = ((P * 1.0) * (P)) / (S * 1.0);
        if (kq < area) {
          area = kq;
          edge1 = listEdge[i], edge2 = listEdge[i + 1];
        }
      }
    }
    cout << edge1 << ' ' << edge1 << ' ' << edge2 << ' ' << edge2 << '\n';
  }
}
