#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 1123456;
template <typename T>
T sqr(T x) {
  return x * x;
}
template <typename T>
void vout(T s) {
  cout << s << "\n";
  exit(0);
}
long long bp(long long a, long long n) {
  long long res = 1;
  while (n) {
    if (n % 2) res *= a;
    a *= a;
    n >>= 1;
  }
  return res;
}
map<long long, long long> mp;
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  long long q;
  cin >> q;
  while (q--) {
    long double ans = 1e18;
    long long x, y, x1, y1;
    long long mn = 1e18;
    mp.clear();
    long long n;
    cin >> n;
    while (n--) {
      long long x;
      cin >> x;
      mp[x]++;
    }
    map<long long, long long>::iterator it = mp.begin();
    for (; it != mp.end(); ++it) {
      long long xx = it->first, val = it->second;
      long double hex1 = xx;
      if (val > 3) {
        if (sqr(4 * hex1) / sqr(hex1) < ans) {
          ans = sqr(4 * hex1) / sqr(hex1);
          x = y = x1 = y1 = xx;
        }
      }
      if (val > 1) {
        if (mn != 1e18) {
          long double hex1 = xx, hex2 = mn;
          if (sqr(2 * (hex1 + hex2)) / (hex1 * hex2) < ans) {
            ans = sqr(2 * (hex1 + hex2)) / (hex1 * hex2);
            x = y = mn;
            x1 = y1 = xx;
          }
        }
        mn = xx;
      }
    }
    mn = 1e18;
    for (it = mp.end(); it != mp.begin();) {
      --it;
      long long xx = it->first, val = it->second;
      long double hex1 = xx;
      if (val > 1) {
        if (mn != 1e18) {
          long double hex1 = xx, hex2 = mn;
          if (sqr(2 * (hex1 + hex2)) / (hex1 * hex2) < ans) {
            ans = sqr(2 * (hex1 + hex2)) / (hex1 * hex2);
            x = y = mn;
            x1 = y1 = xx;
          }
        }
        mn = xx;
      }
    }
    cout << x << " " << y << " " << x1 << " " << y1 << "\n";
  }
  return 0;
}
