#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 10;
const int inf = 1e9 + 7;
int n, q;
unsigned long long a[N];
inline bool B(unsigned long long a, unsigned long long b, unsigned long long c,
              unsigned long long d) {
  return (a * a) * d > b * (c * c);
}
int main() {
  scanf("%d", &q);
  while (q--) {
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
    }
    sort(a + 1, a + n + 1);
    int cnt = 2;
    for (int i = 2; i < n; i++) {
      if (a[i - 1] != a[i] && a[i + 1] != a[i]) continue;
      a[cnt++] = a[i];
    }
    a[cnt] = a[n];
    n = cnt;
    unsigned long long x, y, fl = 1;
    for (int i = 2; i <= n - 2; i++) {
      if (a[i] == a[i - 1] && a[i + 1] == a[i + 2]) {
        if (fl ||
            B((x + y) * 2ll, x * y, (a[i] + a[i + 1]) * 2ll, a[i] * a[i + 1])) {
          x = a[i];
          y = a[i + 1];
          fl = 0;
        }
      }
    }
    cout << x << " " << x << " " << y << " " << y << endl;
  }
}
