#include <bits/stdc++.h>
using namespace std;
int main() {
  int T;
  cin >> T;
  while (T-- > 0) {
    int n;
    scanf("%d", &n);
    map<int, int> cnts;
    for (int i = 0; i < n; i++) {
      int tmp;
      scanf("%d", &tmp);
      cnts[tmp]++;
    }
    int prev = -1;
    int x1 = -1, x2 = -1;
    for (map<int, int>::iterator it = cnts.begin(); it != cnts.end(); it++) {
      if (it->second >= 4) {
        x1 = it->first, x2 = it->first;
        break;
      } else if (it->second >= 2) {
        if (prev != -1) {
          if (x1 == -1 || float(x1) / float(x2) + float(x2) / float(x1) >
                              float(it->first) / float(prev) +
                                  float(prev) / float(it->first)) {
            x1 = prev;
            x2 = it->first;
          }
        }
        prev = it->first;
      }
    }
    cout << x1 << " " << x2 << " " << x1 << " " << x2 << endl;
  }
  return 0;
}
