#include <bits/stdc++.h>
using namespace std;
int aa[10005];
int a[10005];
int main() {
  int t, n, b, a1, a2;
  double ans;
  scanf("%d", &t);
  while (t--) {
    scanf("%d", &n);
    memset(aa, 0, sizeof(aa));
    int j = 0, f = 0;
    for (int i = 0; i < n; i++) {
      scanf("%d", &b);
      if (f) continue;
      aa[b]++;
      if (aa[b] >= 4) {
        printf("%d %d %d %d\n", b, b, b, b);
        f = 1;
      }
      if (aa[b] == 2) {
        a[j] = b;
        j++;
      }
    }
    if (f) continue;
    sort(a, a + j);
    ans = -1;
    for (int i = j - 2; i >= 0; i--) {
      if ((a[i + 1] - a[i]) * 1.0 * (a[i + 1] - a[i]) / (a[i] * a[i + 1]) <
              ans ||
          ans == -1) {
        ans = (a[i + 1] - a[i]) * 1.0 * (a[i + 1] - a[i]) / (a[i] * a[i + 1]);
        a1 = a[i];
        a2 = a[i + 1];
      }
    }
    printf("%d %d %d %d\n", a1, a1, a2, a2);
  }
  return 0;
}
