#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long a;
  cin >> a;
  while (a--) {
    long long n;
    cin >> n;
    vector<long long> v;
    long long k, ans, m1, n1, flag = 0;
    map<long long, long long> m;
    float ans1 = 10000000000000.0;
    for (long long i = 0; i < n; i++) {
      cin >> k;
      m[k]++;
      if (m[k] == 2ll) v.push_back(k);
      if (m[k] == 4ll) {
        flag = 1;
        ans = k;
      }
    }
    sort((v).begin(), (v).end());
    for (int i = 1; i < v.size(); i++) {
      long long o = v[i], u = v[i - 1];
      double t = 1.0 * o / u;
      if (t < ans1) {
        ans1 = t;
        m1 = o;
        n1 = u;
      }
    }
    if (flag == 1)
      cout << ans << " " << ans << " " << ans << " " << ans << '\n';
    else
      cout << m1 << " " << m1 << " " << n1 << " " << n1 << '\n';
  }
  return 0;
}
