#include <bits/stdc++.h>
using namespace std;
const int N = 1e4 + 10;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    vector<long long> v(n);
    for (long long i = 0; i < n; ++i) cin >> v[i];
    sort(v.begin(), v.end());
    long long l = -1, a, b;
    double mn = 1e9;
    for (long long i = 0; i < n; ++i) {
      long long k = 1;
      while (i + 1 < n and v[i + 1] == v[i]) ++i, ++k;
      if (k >= 2) {
        if (l != -1) {
          if ((double)v[i] / v[l] < mn) {
            mn = (double)v[i] / v[l];
            a = v[l], b = v[i];
          }
        }
        if (k >= 4) {
          mn = 1;
          a = b = v[i];
        }
        l = i;
      }
    }
    cout << a << ' ' << a << ' ' << b << ' ' << b << '\n';
  }
}
