#include <bits/stdc++.h>
using namespace std;
const int N = 1e6;
int a[N], v[N], i, j, m, n, p, w, h, t;
bool square;
int main() {
  for (scanf("%d", &t); t--; square = false) {
    for (scanf("%d", &n), m = n - 3, i = 0; i < n; i++) scanf("%d", a + i);
    for (sort(a, a + n), i = 0, p = 0; i < m and not square; i++)
      if (a[i] == a[i + 3])
        w = h = a[i], square = true;
      else {
        if (a[i] == a[i + 2])
          v[p++] = a[i], i += 2;
        else if (a[i] == a[i + 1])
          v[p++] = a[i], i++;
      }
    if (not square) {
      for (j = 0; j < 2; j++)
        if ((i + 1) < n and a[i] == a[i + 1])
          v[p++] = a[i], i += 2;
        else
          i++;
      for (w = v[1], h = v[0], i = 2; i < p; i++)
        if (w * v[i - 1] > h * v[i]) w = v[i], h = v[i - 1];
    }
    printf("%d %d %d %d\n", w, w, h, h);
  }
}
