#include <bits/stdc++.h>
using std::sort;
int T, n;
int a[1001000];
double ans = 2147483640;
int ansx, ansy;
int main() {
  scanf("%d", &T);
  while (T--) {
    ansx = 0, ansy = 0, ans = 2147483640;
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
    }
    sort(a + 1, a + n + 1);
    if (a[1] != a[2]) a[1] = 2147483640;
    if (a[n] != a[n - 1]) {
      a[n] = 2147483640;
    }
    for (int i = 2; i < n; i++) {
      if (a[i] != a[i - 1] && a[i] != a[i + 1]) a[i] = 2147483640;
    }
    sort(a + 1, a + n + 1);
    for (int i = 4; i <= n; i++) {
      if (a[i] == 2147483640) break;
      if (a[i - 3] == a[i - 2] && a[i - 1] == a[i]) {
        int x = a[i - 2], y = a[i - 1];
        double relax = (4.0 * (x + y) * (x + y)) / (1.0 * x * y);
        if (relax < ans) {
          ans = relax;
          ansx = x;
          ansy = y;
        }
      }
    }
    printf("%d %d %d %d\n", ansx, ansx, ansy, ansy);
  }
  return 0;
}
