#include <bits/stdc++.h>
int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while ((ch < '0') || (ch > '9')) {
    if (ch == '-') {
      f = -f;
    }
    ch = getchar();
  }
  while ((ch >= '0') && (ch <= '9')) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
const int maxn = 1000000;
const int maxm = 10000;
const double dinf = 1e16;
int t, n, v[maxn + 10];
int main() {
  t = read();
  while (t--) {
    n = read();
    for (int i = 1; i <= n; ++i) {
      v[i] = read();
    }
    int last = 0, now = 0, a = 0, b = 0, bin = 0;
    double maxx = dinf;
    std::sort(v + 1, v + n + 1);
    v[n + 1] = 0;
    for (int i = 1; i <= n + 1; ++i) {
      if ((v[i] != v[i - 1]) && (bin >= 2)) {
        last = now;
        now = v[i - 1];
        if (bin >= 4) {
          a = b = v[i - 1];
          break;
        }
        if ((last != 0) && (bin >= 2)) {
          double val = 2 * (last + now);
          val = (val * val) / (last * now);
          if (val <= maxx) {
            maxx = val;
            a = last;
            b = now;
          }
        }
      }
      if (v[i] != v[i - 1]) {
        bin = 0;
      }
      ++bin;
    }
    printf("%d %d %d %d\n", a, a, b, b);
  }
  return 0;
}
