#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    map<int, int> m;
    for (int i = 0; i < n; i++) {
      int x;
      scanf("%d", &x);
      m[x] += 1;
    }
    map<int, int>::iterator itr;
    int f = 0;
    vector<int> v;
    bool f1 = 0;
    int a, b;
    double minimum = INT_MAX;
    for (itr = m.begin(); itr != m.end(); itr++) {
      if (itr->second >= 4) {
        int x = itr->first;
        printf("%d %d %d %d\n", x, x, x, x);
        f1 = 1;
        break;
      } else if (itr->second >= 2) {
        v.push_back(itr->first);
        if (v.size() >= 2) {
          if ((double)minimum >
              (double)(double(v[v.size() - 1] / (double)(v[v.size() - 2])))) {
            minimum =
                (double)(double(v[v.size() - 1] / (double)(v[v.size() - 2])));
            a = v[v.size() - 1];
            b = v[v.size() - 2];
          }
        }
      }
    }
    if (f1 == 0) printf("%d %d %d %d\n", a, b, a, b);
  }
}
