#include <bits/stdc++.h>
bool SUBMIT = 1;
using namespace std;
const double PI = acos(-1);
const int inf = 1e6 + 100;
int sn[inf], n;
int main() {
  if (!SUBMIT)
    freopen("i.txt", "r", stdin);
  else
    ios::sync_with_stdio(false);
  int t;
  cin >> t;
  while (t--) {
    cin >> n;
    for (int i = 0; i < n; i++) cin >> sn[i];
    sort(sn, sn + n);
    int a, b, c, d;
    bool f = false, k = false;
    for (int i = 0; i < n - 1; i++) {
      if (sn[i] == sn[i + 1]) {
        i++;
        if (!f)
          a = sn[i], f = true;
        else {
          b = sn[i];
          if (!k) {
            c = a, d = b, a = b, k = true;
            continue;
          }
          if (pow(((double)a + b) * 2, 2) / (a * b) <
              pow(((double)c + d) * 2, 2) / (c * d))
            c = a, d = b;
          a = b;
        }
      }
    }
    cout << c << " " << c << " " << d << " " << d << '\n';
  }
  return 0;
}
