#include <bits/stdc++.h>
using namespace std;
struct Double {
  long long x, y;
  long long a, b;
  Double(long long a = 1, long long b = -1) : a(a), b(b) {
    x = (a + b) * (a + b);
    y = a * b;
  }
  bool operator<(const Double &a) const { return x * a.y < y * a.x; }
};
const int MAXN = (int)1e6 + 1, MAX = (int)2e4 + 1;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  int t;
  cin >> t;
  int a[MAXN], b[MAX];
  while (t--) {
    int n;
    cin >> n;
    for (int i = 0; i < n; ++i) {
      cin >> a[i];
    }
    sort(a, a + n);
    int ptr = 0;
    for (int i = 1; i < n; ++i) {
      if (a[i] == a[i - 1] && (i == n - 1 || a[i + 1] != a[i])) {
        b[ptr++] = a[i];
        if (i >= 3 && a[i - 3] == a[i]) {
          b[ptr++] = a[i];
        }
      }
    }
    Double best;
    for (int i = 1; i < ptr; ++i) {
      best = min(best, Double(b[i], b[i - 1]));
    }
    cout << best.a << " " << best.a << " " << best.b << " " << best.b << "\n";
  }
  return 0;
}
