#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> a(n);
    map<int, int> m;
    std::map<int, int>::iterator it;
    int i;
    for (i = 0; i < n; i++) {
      cin >> a[i];
      if (m.find(a[i]) != m.end()) {
        m[a[i]]++;
      } else {
        m[a[i]] = 1;
      }
    }
    vector<int> num;
    int x;
    int flag = 0;
    for (it = m.begin(); it != m.end(); it++) {
      if (it->second > 1) {
        num.push_back(it->first);
      }
      if (it->second >= 4) {
        flag = 1;
        x = i;
        cout << it->first << " " << it->first << " " << it->first << " "
             << it->first << endl;
        break;
      }
    }
    int s = num.size();
    if (flag == 0) {
      double mini = 1e9;
      int index;
      for (i = 0; i < s - 1; i++) {
        double g = (num[i] * 1.0 / num[i + 1]);
        double h = (num[i + 1] * 1.0 / num[i]);
        if (g + h < mini) {
          mini = g + h;
          index = i;
        }
      }
      cout << num[index] << " " << num[index] << " " << num[index + 1] << " "
           << num[index + 1] << endl;
    }
  }
}
