#include <bits/stdc++.h>
using namespace std;
int cnt[10005];
int main() {
  cin.sync_with_stdio(false);
  cin.tie(NULL);
  int test;
  cin >> test;
  int n, x, a, b;
  double chck, mn;
  vector<double> v;
  while (test--) {
    mn = 1e+9;
    v.clear();
    memset(cnt, 0, sizeof cnt);
    cin >> n;
    for (int i = 0; i < n; i++) {
      cin >> x;
      cnt[x]++;
      if (cnt[x] == 2 || cnt[x] == 4) v.push_back(x);
    }
    sort(v.begin(), v.end());
    for (int i = 1; i < v.size(); i++) {
      chck = (v[i] / v[i - 1]) + (v[i - 1] / v[i]);
      if (chck < mn) a = v[i], b = v[i - 1], mn = chck;
    }
    printf("%d %d %d %d\n", a, a, b, b);
  }
}
