#include <bits/stdc++.h>
int main() {
  std::ios::sync_with_stdio(false);
  int T;
  std::cin >> T;
  for (int i = 0; i < T; ++i) {
    int n;
    double min_otn;
    int min_index = 0;
    std::cin >> n;
    int vg = -1;
    std::vector<int> g;
    std::map<int, int> m;
    for (int j = 0; j < n; ++j) {
      int l;
      std::cin >> l;
      auto x = ++m[l];
      if (x == 2) {
        g.push_back(l);
      }
      if (x >= 4) {
        vg = l;
      }
    }
    if (vg != -1) {
      for (int j = 0; j < 4; ++j) {
        std::cout << vg << ' ';
      }
      std::cout << '\n';
    } else {
      std::sort(g.begin(), g.end());
      min_otn = ((double)g[1]) / g[0];
      for (int j = 0; j < g.size() - 1; ++j) {
        if (((double)g[j + 1]) / g[j] < min_otn) {
          min_otn = ((double)g[j + 1]) / g[j];
          min_index = j;
        }
      }
      for (int j = 0; j < 2; ++j) {
        std::cout << g[min_index] << ' ' << g[min_index + 1] << ' ';
      }
      std::cout << '\n';
    }
  }
  return 0;
}
