#include <bits/stdc++.h>
using namespace std;
const long long int N = 1e4 + 5;
const long long int mod = 1e18 + 7;
const long long int level = 20;
long long int dx[] = {1, -1, 0, 0};
long long int dy[] = {0, 0, 1, -1};
map<long long int, long long int> cnt;
vector<long long int> v;
int main() {
  ios::sync_with_stdio(false);
  long long int testCases;
  cin >> testCases;
  while (testCases--) {
    long long int l = 0, r = 0;
    cnt.clear();
    v.clear();
    long long int n;
    cin >> n;
    for (long long int i = 0; i < n; i++) {
      long long int x;
      cin >> x;
      if (cnt[x] == 1) v.push_back(x);
      cnt[x]++;
    }
    sort(v.begin(), v.end());
    n = v.size();
    long double ans = mod * 0.1;
    for (long long int i = 0; i < n; i++) {
      long long int x = v[i];
      if (cnt[x] >= 4) {
        long double temp = 16 * 1.0;
        if (ans > temp) {
          ans = temp;
          l = x;
          r = x;
        }
      } else if (i < (n - 1)) {
        long long int y = v[i + 1];
        if (cnt[x] >= 2 and cnt[y] >= 2) {
          long double temp = 4 * 1.0 * (x + y) * (x + y) / (long double)(x * y);
          if (ans > temp) {
            ans = temp;
            l = x;
            r = y;
          }
        }
      }
    }
    cout << l << " " << l << " " << r << " " << r << endl;
  }
  return 0;
}
