#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000050;
long long read() {
  char ch = getchar();
  long long x = 0, f = 1;
  while (!(ch >= '0' && ch <= '9')) {
    if (ch == '-') f = -1;
    ch = getchar();
  };
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + (ch - '0');
    ch = getchar();
  };
  return x * f;
}
long long num[10050], a[maxn];
int main() {
  int T, n;
  T = read();
  while (T--) {
    n = read();
    memset(num, 0, sizeof(num));
    for (int i = 0; i < n; i++) {
      a[i] = read();
      num[a[i]]++;
    }
    long long ans1 = 100000000;
    long long ans2 = 1;
    long long pre = -1;
    long long ans[4];
    sort(a, a + n);
    for (int j = 0; j < n; j++) {
      if (j > 0 && a[j] == a[j - 1]) continue;
      long long i = a[j];
      if (num[i] >= 4) {
        long long t1 = (long long)(2 * i) * (2 * i);
        long long t2 = (long long)i * i;
        if (ans1 * t2 > t1 * ans2) {
          ans1 = t1;
          ans2 = t2;
          ans[0] = ans[1] = ans[2] = ans[3] = i;
        }
      } else if (num[i] >= 2 && pre != -1) {
        long long t1 = (long long)(pre + i) * (pre + i);
        long long t2 = (long long)pre * i;
        if (ans1 * t2 > t1 * ans2) {
          ans1 = t1;
          ans2 = t2;
          ans[0] = ans[1] = pre;
          ans[2] = ans[3] = i;
        }
      }
      if (num[i] >= 2) pre = i;
    }
    for (int i = 0; i < n; i++) {
      num[a[i]]--;
    }
    printf("%I64d %I64d %I64d %I64d\n", ans[0], ans[1], ans[2], ans[3]);
  }
  return 0;
}
