#include <bits/stdc++.h>
using namespace std;
template <class T>
ostream &operator<<(ostream &os, const pair<T, T> &p) {
  return os << "(" << p.first << "," << p.second << ")";
}
template <class T>
ostream &operator<<(ostream &os, const pair<const T, T> &p) {
  return os << "(" << p.first << "," << p.second << ")";
}
template <class T>
ostream &operator<<(ostream &os, const array<T, 3> &p) {
  return os << "(" << p[0] << "," << p[1] << "," << p[2] << ")";
}
template <class T>
ostream &operator<<(ostream &os, const vector<T> &p) {
  for (auto x : p) os << x << ' ';
  return os;
}
const double EPS = 1e-9;
const double PI = acos(-1);
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3f;
const long long mod = 1e9 + 7;
const int SZ = 1e5 + 20;
int cont[10010];
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    scanf(" %d", &n);
    memset(cont, 0, sizeof(cont));
    vector<int> v;
    int res = INF;
    for (int i = 0; i < n; i++) {
      int x;
      scanf(" %d", &x);
      cont[x]++;
      if (cont[x] % 2 == 0) v.push_back(x);
      if (cont[x] == 4) res = x;
    }
    if (res != INF) {
      printf("%d %d %d %d\n", res, res, res, res);
      continue;
    }
    sort((v).begin(), (v).end());
    double menor = 1e9;
    int a, b;
    for (int j = 0; j < v.size() - 1; j++) {
      int x = v[j];
      int i = j + 1;
      if (i < v.size()) {
        double aux = (x + v[i] + 0.0) * (x + v[i] + 0.0) / (x * 1.0 * v[i]);
        if (aux < menor) {
          menor = aux;
          a = x;
          b = v[i];
        }
      }
    }
    printf("%d %d %d %d\n", a, a, b, b);
  }
  return 0;
}
