#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e4 + 1000;
const long long INF = 1e9 + 7;
const long long mod = 1e9 + 7;
int cnt[10101];
long long a[1000005];
template <class T>
inline bool read(T &ret) {
  char c;
  int sgn;
  if (c = getchar(), c == EOF) return 0;
  while (c != '-' && (c < '0' || c > '9')) c = getchar();
  sgn = (c == '-') ? -1 : 1;
  ret = (c == '-') ? 0 : (c - '0');
  while (c = getchar(), c >= '0' && c <= '9') ret = ret * 10 + (c - '0');
  ret *= sgn;
  return 1;
}
int main() {
  int ca;
  read(ca);
  while (ca--) {
    int n;
    read(n);
    memset(cnt, 0, sizeof(cnt));
    for (int i = 1; i <= n; i++) {
      read(a[i]);
      cnt[(int)a[i]]++;
    }
    sort(a + 1, a + n + 1);
    long long num = INF, den = 1;
    int ans[5];
    long long pre = -1;
    for (int i = 1; i <= n; i++) {
      if (i != 1 && a[i] == a[i - 1]) continue;
      int t = a[i];
      if (cnt[t] >= 4) {
        long long c = (long long)4 * t * t;
        long long d = (long long)(t * t);
        if (num * d > den * c) {
          num = c;
          den = d;
          ans[1] = ans[2] = ans[3] = ans[4] = t;
        }
      } else if (cnt[t] >= 2 && pre != -1) {
        long long c = (long long)(pre + t) * (pre + t);
        long long d = (long long)t * pre;
        if (num * d > den * c) {
          num = c;
          den = d;
          ans[1] = ans[2] = t;
          ans[3] = ans[4] = pre;
        }
      }
      if (cnt[t] >= 2) pre = t;
    }
    for (int i = 1; i <= 4; i++) {
      printf("%d%c", ans[i], " \n"[i == 4]);
    }
  }
  return 0;
}
