#include <bits/stdc++.h>
using namespace std;
map<double, int> mp;
int main() {
  int T;
  cin >> T;
  while (T--) {
    double Min = 1e9;
    double x;
    double y;
    int n;
    scanf("%d", &n);
    bool Done = false;
    for (int i = 0; i < n; i++) {
      double a;
      scanf("%lf", &a);
      if (++mp[a] >= 4 && !Done) {
        Done = true;
        x = a;
        y = a;
      }
    }
    for (map<double, int>::iterator it = mp.end(); it != mp.begin() && !Done;) {
      if (it == mp.end() || (it->second) < 2) {
        it--;
        continue;
      }
      bool Enter = false;
      for (map<double, int>::iterator it2 = it; (it2--) != mp.begin();) {
        if ((it2->second) < 2) continue;
        double a = ((double)((it->first) / (it2->first))) +
                   ((double)((it2->first) / (it->first)));
        if (a < Min) {
          Min = a;
          x = it->first;
          y = it2->first;
        }
        it = it2;
        Enter = true;
        break;
      }
      if (!Enter) it--;
    }
    printf("%.0lf %.0lf %.0lf %.0lf \n", x, x, y, y);
    mp.clear();
  }
}
