#include <bits/stdc++.h>
using namespace std;
inline int rd() {
  int x = 0, f = 1;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') f = -1;
  for (; isdigit(ch); ch = getchar()) x = x * 10 + ch - '0';
  return x * f;
}
int T;
map<int, int> but;
int a[2000000], N, M;
int main() {
  T = rd();
  while (T--) {
    double minv;
    int chose;
    bool chosed = false;
    but.clear();
    M = 0;
    N = rd();
    for (int i = 1; i <= N; ++i) {
      int x = rd();
      ++but[x];
      if (but[x] == 2) a[++M] = x;
      if (but[x] == 4) {
        chosed = true;
        chose = x;
      }
    }
    if (chosed) {
      printf("%d %d %d %d\n", chose, chose, chose, chose);
      continue;
    }
    sort(a + 1, a + M + 1);
    minv = 1.0 * a[2] / a[1] + 1.0 * a[1] / a[2];
    chose = 2;
    for (int i = 3; i <= M; ++i) {
      if (1.0 * a[i] / a[i - 1] + 1.0 * a[i - 1] / a[i] <= minv) {
        chose = i;
        minv = 1.0 * a[i] / a[i - 1] + 1.0 * a[i - 1] / a[i];
      }
    }
    printf("%d %d %d %d\n", a[chose], a[chose], a[chose - 1], a[chose - 1]);
  }
  return 0;
}
