#include <bits/stdc++.h>
using namespace std;
const long long INF = 0x3f3f3f3f3f3f3f3fll;
const int inf = 0x3f3f3f3f;
const int maxn = 1e6 + 2;
const int maxm = 1e5 + 10;
const long long mod = 1e9 + 7;
const double eps = 1e-9;
const double PI = acos(-1.0);
struct Point {
  long long x, y;
  Point() {}
  Point(long long _x, long long _y) { x = _x, y = _y; }
  Point operator-(Point &a) { return Point(x - a.x, y - a.y); }
  long long operator*(Point &a) { return x * a.x + y * a.y; }
  long long operator^(Point &a) { return x * a.y - y * a.x; }
} p[10];
long long dist2(Point a, Point b) {
  return (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y);
}
double dist(Point a, Point b) { return sqrt(1.0 * dist2(a, b)); }
int a[maxn], num[10005];
int main() {
  int t, n;
  scanf("%d", &t);
  while (t--) {
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
      scanf("%d", &a[i]);
      num[a[i]]++;
    }
    long long ans1 = inf;
    long long ans2 = 1;
    int pre = -1;
    sort(a, a + n);
    int ans[4];
    for (int i = 0; i < n; i++) {
      if (i > 0 && a[i] == a[i - 1]) continue;
      int j = a[i];
      if (num[j] >= 4) {
        long long t1 = 4ll * j * j;
        long long t2 = (long long)j * j;
        if (ans1 * t2 > t1 * ans2) {
          ans1 = t1;
          ans2 = t2;
          ans[0] = ans[1] = ans[2] = ans[3] = j;
        }
      } else if (num[j] >= 2 && pre != -1) {
        long long t1 = (long long)(pre + j) * (pre + j);
        long long t2 = (long long)pre * j;
        if (ans1 * t2 > ans2 * t1) {
          ans1 = t1;
          ans2 = t2;
          ans[0] = ans[1] = pre;
          ans[2] = ans[3] = j;
        }
      }
      if (num[j] >= 2) pre = j;
    }
    printf("%d %d %d %d\n", ans[0], ans[1], ans[2], ans[3]);
    for (int i = 0; i < n; i++) num[a[i]]--;
  }
  return 0;
}
