#include <bits/stdc++.h>
using namespace std;
int n, a[10005], b[1000005], c[1000005];
vector<int> v;
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    scanf("%d", &n);
    int t = 0;
    v.clear();
    for (int i = 1, x; i <= n; i++)
      scanf("%d", &c[i]), a[c[i]]++, v.push_back(c[i]);
    sort(v.begin(), v.end());
    for (int i = 0; i < v.size(); i++)
      if (!i || v[i] != v[i - 1])
        for (int j = 2; j <= a[v[i]]; j += 2) b[++t] = v[i];
    int a1 = (b[1] + b[2]) * (b[1] + b[2]), a2 = b[1] * b[2], ans = 1;
    for (int i = 2; i < t; i++) {
      int t1 = (b[i] + b[i + 1]) * (b[i] + b[i + 1]), t2 = b[i] * b[i + 1];
      if (1ll * a1 * t2 > 1ll * a2 * t1) a1 = t1, a2 = t2, ans = i;
    }
    printf("%d %d %d %d\n", b[ans], b[ans], b[ans + 1], b[ans + 1]);
    for (int i = 1, x; i <= n; i++) a[c[i]]--;
  }
  return 0;
}
