#include <bits/stdc++.h>
using namespace std;
int main() {
  int q;
  cin >> q;
  while (q--) {
    int n;
    scanf("%d", &n);
    int a[n], i, k, l;
    for (i = 0; i < n; i++) scanf("%d", &a[i]);
    sort(a, a + n);
    vector<double> v;
    double val, min = 10000000;
    i = 0;
    while (i < n - 1) {
      if (a[i] == a[i + 1]) {
        v.push_back(a[i]);
        i++;
      }
      i++;
    }
    for (i = 0; i < v.size() - 1; i++) {
      val = (v[i] / v[i + 1]) + (v[i + 1] / v[i]);
      if (val < min) {
        min = val;
        k = v[i];
        l = v[i + 1];
      }
    }
    printf("%d %d %d %d\n", k, k, l, l);
  }
  return 0;
}
