#include <bits/stdc++.h>
using namespace std;
long long MOD = 1000000007;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    long long n, x;
    cin >> n;
    vector<long long> v;
    map<long long, long long> m;
    for (long long int i = 0; i <= n - 1; i++) {
      cin >> x;
      m[x]++;
      if (m[x] == 2) {
        m[x] = 0;
        v.push_back(x);
      }
    }
    long double min = 1e12;
    long long pos = 1;
    sort(v.begin(), v.end());
    for (long long int i = 1; i <= v.size() - 1; i++) {
      long double x1 = (1.0 * v[i]) / v[i - 1];
      long double y1 = (1.0 * v[i - 1]) / v[i];
      long double sum = x1 + y1;
      if (sum < min) {
        min = sum;
        pos = i;
      }
    }
    cout << v[pos] << " " << v[pos] << " ";
    cout << v[pos - 1] << " " << v[pos - 1] << endl;
  }
  return 0;
}
