#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e16 + 1;
const long long mod = 1000000007;
long long custom_ceil(long long Nr, long long Dr) {
  if (Nr % Dr == 0)
    return Nr / Dr;
  else
    return Nr / Dr + 1;
}
void solve() {
  long long n;
  cin >> n;
  map<long long, long long> mp;
  for (long long i = 0; i < n; i++) {
    long long a;
    cin >> a;
    mp[a]++;
  }
  vector<long long> v;
  for (auto x : mp) {
    if (x.second >= 4) {
      cout << x.first << " " << x.first << " " << x.first << " " << x.first
           << endl;
      return;
    } else if (x.second >= 2) {
      v.push_back(x.first);
    }
  }
  long double mn = (long double)v[0] / v[1] + (long double)v[1] / v[0];
  long long n1 = v[0], n2 = v[1];
  for (long long i = 1; i < (long long)((v).size()) - 1; i++) {
    long double temp =
        (long double)v[i] / v[i + 1] + (long double)v[i + 1] / v[i];
    if (temp < mn) {
      mn = temp;
      n1 = v[i];
      n2 = v[i + 1];
    }
  }
  cout << n1 << " " << n2 << " " << n2 << " " << n1 << endl;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
