#include <bits/stdc++.h>
using namespace std;
void solve() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    map<int, int> mp;
    vector<int> vec;
    int fg = 0;
    for (int i = 0; i < n; i++) {
      int x;
      scanf("%d", &x);
      mp[x]++;
      if (mp[x] == 2) vec.push_back(x);
      if (mp[x] == 4 && !fg) {
        printf("%d %d %d %d\n", x, x, x, x);
        fg = 1;
      }
    }
    if (fg) continue;
    sort(vec.begin(), vec.end());
    double dp = 1e10;
    int l = vec[0], w = vec[0];
    for (int i = 0; i < vec.size() - 1; i++) {
      double x = vec[i];
      double y = vec[i + 1];
      if (dp >= (x / y + y / x)) {
        l = x;
        w = y;
        dp = (x / y + y / x);
      }
    }
    printf("%d %d %d %d\n", l, l, w, w);
  }
}
int main() { solve(); }
