#include <bits/stdc++.h>
inline char in() {
  static char buf[10001], *p1 = buf, *p2 = buf;
  return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 10000, stdin), p1 == p2)
             ? EOF
             : *p1++;
}
template <class Tp>
void read(register Tp &s) {
  s = 0;
  register bool neg = 0;
  register char c;
  while (!isdigit(c = in()))
    if (c == '-') neg = 1;
  while (s = (s << 3) + (s << 1) + c - 48, isdigit(c = in()))
    ;
  s = (neg ? -s : s);
}
int T, n, a[1000005];
std::map<int, int> cnt;
int main() {
  for (read(T); T; --T) {
    cnt.clear();
    read(n);
    int t, m = 0;
    for (int i = 1; i <= n; ++i) read(t), cnt[t]++;
    bool flg = 0;
    for (std::map<int, int>::iterator it = cnt.begin(); it != cnt.end(); ++it) {
      if ((*it).second >= 2) a[++m] = (*it).first;
      if ((*it).second >= 4) {
        flg = 1;
        int ans = (*it).first;
        printf("%d %d %d %d\n", ans, ans, ans, ans);
        break;
      }
    }
    if (flg) continue;
    int x = a[1], y = a[2];
    for (int i = 3; i <= m; ++i)
      if (x * a[i] < a[i - 1] * y) x = a[i - 1], y = a[i];
    printf("%d %d %d %d\n", x, x, y, y);
  }
  return 0;
}
